julia Questions

2

Julia-users: is there an equivalent to R's sample(x,y,prob=) to sample from a given set of values with weighted probabilities? The rand() function is equivalent to sample(x,y), but as far as I'm aw...
Bedlam asked 12/2, 2016 at 12:44

4

The code that worked in 0.3: type foo bar::Int = 0 end After migrating to Julia 0.4- produces errors like julia4 test.jl ERROR: LoadError: syntax: "bar::Int=0" inside type definition is reserv...
Prudence asked 7/7, 2015 at 23:10

3

Solved

I am using Julia 1.4.2. my version info is, Julia Version 1.4.2 Commit 44fa15b150* (2020-05-23 18:35 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GH...
Porthole asked 5/7, 2020 at 8:51

4

Solved

I am trying out the Julia DataFrames module. I am interested in it so I can use it to plot simple simulations in Gadfly. I want to be able to iteratively add rows to the dataframe and I want to ini...
Georgetown asked 5/10, 2014 at 8:39

2

I'm trying to do a pretty simple task in Python that I have already done in Julia. It consists of taking an array of multiple 3d elements and making a dictionary of indexes of unique values from th...
Heraldry asked 15/10, 2022 at 15:59

3

For example, say I want to print text using the following color: R: 0.5 G: 0.8 B: 0.1 I know about print_with_color() but as far as I know it has to use a Symbol to print, and I do not know how...
Sthilaire asked 13/1, 2015 at 19:12

7

Solved

I'm using v"0.3.8" on Windows. I found from http://julialang.org/downloads/ Current Release (v0.3.9) I know I could download the prebuild version and install again. Is there a way to upg...
Baptista asked 31/5, 2015 at 8:10

4

I am using Julia Studio and would like to know the command for clearing the console of text and memory like imports or variables? Something like matlabs "clc" and "clear" commands.
Vincevincelette asked 24/10, 2014 at 13:17

3

Solved

classA = Dataset(id = ["id1", "id2", "id3", "id4", "id5"], mark = [50, 69.5, 45.5, 88.0, 98.5]); grades = Dataset(mark = [0, 49.5, 59.5, 69.5, 79...
Gonfalon asked 19/9, 2022 at 4:55

3

Solved

In Julia plotting with Plots, I know how to set the various attributes when using plot() (Attributes). I want to know how to set the default attributes, so that I don't need to set them every time....
Diamonddiamondback asked 1/1, 2021 at 13:57

4

Solved

Given a function/expression that yields a single column, how to build a matrix from those columns in Julia? I tried the following (simplified example): column(j) = [j, j, j] # for example my_matri...
Chasseur asked 27/4, 2015 at 13:42

4

Solved

Let's create Julia DataFrame df=convert(DataFrame, rand(10, 4)) It would look like this. I am trying to take the transpose of this dataFrame. "transpose" function appears to be not working for ...
Ameline asked 6/6, 2016 at 23:27

2

Solved

I want to filter a dictionary using filter() function but I am having trouble with it. What I wish to accomplish is, to return the key for some condition of the value. However I am getting a method...
Boylston asked 3/9, 2022 at 2:8

3

Solved

Processing ASCII characters beyond the range 1-127 can easily crash Julia. mystring = "A-Za-zÀ-ÿŽž" for i in 1:length(mystring) print(i,":::") print(Int(mystring[i]),"::&...
Refugiorefulgence asked 31/8, 2022 at 9:0

2

How can I load a python .pkl (pickle) file from Julia?
Sturdivant asked 14/1, 2021 at 14:11

7

Solved

I'm getting this error in VS Code: Could not start the julia language server. Make sure the configuration setting julia.executablePath points to the julia binary. In user settings I put "jul...
Internist asked 8/12, 2016 at 14:34

2

Solved

I would like a way to programmatically "deconstruct" a vector of variable-length vectors in Julia. I do not care about the resulting vector's order. For example, suppose that my vector of...
Seigler asked 23/8, 2022 at 14:4

2

Solved

How can I make the lines for the x- and y-axes thicker in Julia Plots? Is there a simple way to achieve this? MWE: using Plots Nx, Ny = 101,101 x = LinRange(0, 100, Nx) y = LinRange(0, 100, Ny) f...
Utilitarianism asked 27/11, 2021 at 9:33

2

Solved

I have created a package (let's call it package_name) in Julia; the file structure is already generated along with the Project.toml and Manifest.toml files and I have already added some dependencie...
Tessin asked 26/9, 2020 at 14:16

1

Solved

I am new to Julia and have few confusions regarding Multiprocessing and multithreading. Previously many people have asked similar questions in stackoverflow, but I still have confusions. They are a...
Frieder asked 16/8, 2022 at 13:52

3

Solved

Is there a way to convert an object in Julia to a code representation generating the same object? I am basically looking for an equivalent to R's dput function. So if I have an object like: A = ...
Kr asked 8/7, 2018 at 16:40

2

Solved

Here on stackoverflow.com - when I provide sample data to make a reproducible example, how can I do it the Julian way? In R for example dput(df) will output a string with which you can create df a...
Amateurish asked 11/5, 2020 at 6:11

2

Solved

In the R-language I am able to declare a function and to see the body of the function like so: > megafoobar = function(x){ return(x + 10000 )} > body(megafoobar) { return(x + 10000) } Is...
Olfe asked 6/10, 2014 at 19:42

3

Solved

This seems to be a simple question but I can't find any answer online. Suppose my current working directory is C:/parent_folder/sub_folder, and I want to get C:/parent_folder in Julia. Edit: I ha...
Betrothal asked 24/12, 2019 at 18:18

1

Solved

Assume I have a module SomeModule.jl: module SomeModule export use_me function use_me() println("I'm useful!") end function call_me_in_the_end() println("This is the end") ...
Ladawnladd asked 28/7, 2022 at 18:11

© 2022 - 2024 — McMap. All rights reserved.