[julia-users] Re: Read back a Dict from a text file in Julia ?

2015-11-21 Thread David Gold
Note that your dd is a Dict{String, Any}. If you access its entries inside a function, the type inference system that runs when the function is JIT compiled will not have any information on the types of the objects returned from accessing dd. The lack of concrete type information will most

Re: [julia-users] gadfly plotting

2015-11-21 Thread Tom Breloff
The error message isn't very informative, but you're missing a Gadfly.Geom in your first layer. On Sat, Nov 21, 2015 at 12:23 PM, digxx wrote: > Im trying to plot the following using layers...though do I have to load it > separately or why doesnt it work? > > julia>

Re: [julia-users] gadfly plotting

2015-11-21 Thread digxx
I dont think Geom. is compulsory or? In what way is it not informative? What do u need? :-/

[julia-users] YAPI (yet another proxy issue)

2015-11-21 Thread Tony Kelman
1 is potentially a certificate issue with a caching server we use. Stefan needs to set up a new redirect under julialang.org which will hopefully work for more people. On 2, which packages are you seeing this on?

Re: [julia-users] DataFrames : Apply a function by rows

2015-11-21 Thread Fred
It is a good idea but how is it possible to iterate two dataframes at the same time ? Something like : julia> df = DataFrame(a=1:5, b=7:11, c=10:14, d=20:24) 5x4 DataFrames.DataFrame | Row | a | b | c | d | |-|---|||| | 1 | 1 | 7 | 10 | 20 | | 2 | 2 | 8 | 11 | 21 | | 3

Re: [julia-users] DataFrames : Apply a function by rows

2015-11-21 Thread Tom Short
You can try `eachrow`. It probably won't be fast, though. Here's an example: https://github.com/JuliaStats/DataFrames.jl/blob/master/test/iteration.jl#L34 On Nov 21, 2015 7:19 AM, "Fred" wrote: > Hi, > > In DataFrames, it is easy to apply a function by columns using

Re: [julia-users] DataFrames : Apply a function by rows

2015-11-21 Thread Tom Short
For the subset, do the indexing after the conversion to an array, or subset the DataFrame first (probably faster). On Nov 21, 2015 8:43 AM, "Fred" wrote: > Thanks for the answer. I tried "eachrow" but I have 2 problems : > > 1- I still have to do an array conversion, I

Re: [julia-users] DataFrames : Apply a function by rows

2015-11-21 Thread Fred
Thanks for the answer. I tried "eachrow" but I have 2 problems : 1- I still have to do an array conversion, I think it is slow julia> for r in eachrow(df) println(mean(convert(Array,r))) end 6.0 7.0 8.0 9.0 10.0 2- I do not manage to use a subset of the row, for

[julia-users] gadfly plotting

2015-11-21 Thread digxx
Im trying to plot the following using layers...though do I have to load it separately or why doesnt it work? julia> plotcomb=plot( layer( x=Q_l, y=cal_corr ), layer( x=Q_l, y=cal_corr, Geom.line ), Theme(panel_opacity=0.1)

Re: [julia-users] Writing CSV

2015-11-21 Thread digxx
Though this is not a big issue since I can convert the strings to double as I want IDL still tells me the following IDL>corr=read_csv(dir+'writecsv_test.csv') IDL> help,corr ** Structure , 4 tags, length=1176, data length=1176, refs=1: FIELD1 DOUBLEArray[21] FIELD2

[julia-users] Re: YAPI (yet another proxy issue)

2015-11-21 Thread Antonio Suriano
I don't remember if it is some Gadfly or Escher dependance. Il giorno sabato 21 novembre 2015 19:18:22 UTC+1, Tony Kelman ha scritto: > > 1 is potentially a certificate issue with a caching server we use. Stefan > needs to set up a new redirect under julialang.org which will hopefully > work

[julia-users] Re: split a utf-8 string

2015-11-21 Thread elextr
On Sunday, November 22, 2015 at 10:02:03 AM UTC+10, James Gilbert wrote: > > The spaces in your string are '\u3000' the ideographic space. > isspace('\u3000') returns true, and split(s) is supposed to split on all > space characters, so I think this might be a julia bug. > Or a documentation

[julia-users] Re: Read back a Dict from a text file in Julia ?

2015-11-21 Thread Nitin Arora
The dd is just an example Dict. I plan to use well defined types in the Dict for the actual application. On Saturday, November 21, 2015 at 9:30:08 AM UTC-8, David Gold wrote: > > Note that your dd is a Dict{String, Any}. If you access its entries inside > a function, the type inference system

Re: [julia-users] Re: Better alternative to find all permutations?

2015-11-21 Thread Glen O
While it is true that an interpretation of arrays is multisets, that's not the only reasonable interpretation. And while the strict interpretation of "permutations" suggests it should include duplicates, you have to consider what the user would most likely expect it to do. Most would think that

Re: [julia-users] DataFrames : Apply a function by rows

2015-11-21 Thread Fred
In my last example, the function mean() is not well chosen. In fact, what I would like to calculate is a statistical test line by lline, like TTest, or Wilcoxon. This is why I need to iterate thought 2 DataFrames at the same time if I subset the DataFrame first to increase speed :) Something

[julia-users] Re: Coveralls/Codecov report certain lines are not covered, but test for the lines do appear to exist in code

2015-11-21 Thread Dan
Regarding the last printing point only print(string(eltype(8)) * ", " * string(eltype(8))) is probably what you meant. AbstractString(Int64), tries to create an AbstractString from an Int64, while string(Int64) asks for a string representation. The latter semantics is more accurate, and works.

[julia-users] split a utf-8 string

2015-11-21 Thread Lex
Hi All I am having trouble splitting a string in UTF-8 encoding. In my program, I am reading a file and splitting each line. On the terminal, copy-pasting the line shows the same behaviour. julia> julia> s::UTF8String = "Time flies like an arrow.(光陰矢の如し)" "Time flies like an arrow.(光陰矢の如し)"

Re: [julia-users] gadfly plotting

2015-11-21 Thread Tom Breloff
I meant that the error isn't informative to you, so it makes sense you're not sure where to look. You don't need a Geom if you were calling plot directly, as it automatically chooses Geom.point for you: plot(x=1:10,y=rand(10)) But creating your own layers, the default Geom is Geom.Nil. This

[julia-users] Re: split a utf-8 string

2015-11-21 Thread James Gilbert
The spaces in your string are '\u3000' the ideographic space. isspace('\u3000') returns true, and split(s) is supposed to split on all space characters, so I think this might be a julia bug.

[julia-users] What is the best way to get two by two tables in Julia?

2015-11-21 Thread Arin Basu
Hi All, Can you kindly advise how to get a simple way to do two by two tables in Julia with two categorical variables. I have tried split-apply-combine (by function) and it works with single variables, but with two or more variables, I cannot get the table I want. This is really an issue if

[julia-users] Re: Read back a Dict from a text file in Julia ?

2015-11-21 Thread Nitin Arora
JSON might work but then the inputs are not very human readable (as I may have large arrays assigned to some of the keys). I did investigate using JLD but looks like it stores file in HDF5 format, which is not human readable/editable. On Saturday, November 21, 2015 at 2:21:47 AM UTC-8, Eric

[julia-users] Coveralls/Codecov report certain lines are not covered, but test for the lines do appear to exist in code

2015-11-21 Thread Zygmunt Szpak
Hi All, I've been perusing the Coveralls/Codecov reports looking for opportunities to write some additional tests. I was looking at the promote_rule in int.jl and noticed that some promote_rules were apparently missing tests. See for example: promote_rule(::Type{Int64}, ::Type{Int8} ) =

[julia-users] Re: Read back a Dict from a text file in Julia ?

2015-11-21 Thread Eric Forgy
Is JSON an option for you? That was my first thought. Have you seen https://github.com/JuliaLang/JLD.jl ? This is probably the best solution. On Saturday, November 21, 2015 at 6:11:38 PM UTC+8, Nitin Arora wrote: > > Found a workable solution using https://github.com/r2dbg/ConfParser.jl > ,

[julia-users] ANN: Cluster dictionaries

2015-11-21 Thread Amit Murthy
Hello, A small package https://github.com/amitmurthy/ClusterDicts.jl has been added which provides two types of distributed dictionaries: - GlobalDict where the same key-value pair is stored on all participating workers. - DistributedDict where the key-value pairs are distributed over the

Re: [julia-users] Memory leak for animated plots

2015-11-21 Thread Rohit Thankachan
> > sda > When I first execute, I see the following: > > Javascript error adding output! > ReferenceError: Patchwork is not defined > See your browser Javascript console for more details. > > This is probably https://github.com/shashi/Patchwork.jl/issues/12. Can you try running

[julia-users] Read back a Dict from a text file in Julia ?

2015-11-21 Thread Nitin Arora
Hi All, I am creating a text base user-input interface for an optimization framework I am developing in Julia. I am relatively new to Julia and have only previously programmed in Fortran (mostly) and in C. I am planning to read in/out my variables and their corresponding value (which can by

[julia-users] Re: Read back a Dict from a text file in Julia ?

2015-11-21 Thread Nitin Arora
Found a workable solution using https://github.com/r2dbg/ConfParser.jl , but its ugly, with custom code each new variable I ass. A direct read on the text file, similar to NAMELIST feature in Fortran will be useful. Then we can just update the Dict and it will be able to read the updated