Hi,
I use Sublime, and am curious about Julia. I have installed the
Sublime-IJulia package, and it works (OS X). But I find the notebook 'I'
framework confusing, slow and clumsy. My mistake, I know, I am sure it
works well for most people, but I prefer a workflow with a separate script
and
I am using Julia 0.4, compiling from the release-0.4 branch on github.
Considering using 'master' instead, but - is there somewhere that lists the
planned and implemented changes to the dev version at once?
Hi,
when I load a package that has been updated, it usually recompiles for a
long time (e.g. Gadfly). I would like this time to be at the time of
updating (where I am not actively working in Julia) rather than at 'using',
where I am actively working. Is there a setting to automatically
Hi, I am learning julia, and thought I would practice by migrating some of
my code from R. I run into the problem that the data structures in julia
does not seem to offer row names? I looked here in the forum and found a 2
year old discussion, that seems to end of the, IMHO slightly imprecise
Hi,
in the Julia documentation, I fell over this strange behaviour:
julia> 1.1 + 0.1
1.2002
I understand that this may make sense in the context of how floating
numbers are implemented inside Julia - but I cannot think of a single
situation in which the user would want this
skrev Michael
Borregaard:
>
> Hi,
> in the Julia documentation, I fell over this strange behaviour:
>
> julia> 1.1 + 0.1
> 1.2002
>
> I understand that this may make sense in the context of how floating
> numbers are implemented inside Julia - but I cannot
Hi,
I am trying to migrate from R to julia. I am trying to wrap my head around:
In R, there are the apply functions - when used with, e.g. a function that
returns a 1d array of constant length, they will return a 2d array with the
results. In julia, using map() will return a Array{Array{T, 1},
Is there a way in julia to restrict the values of arguments to a function,
eg to the contents of a certain vector?
So, e.g. method in the function
function foo(x, method::String) ...
would be constrained to either "spearman", "pearson" or "kendall"?
Thanks
Hi,
does anyone know how to fix the aspect ratio in a compose canvas? Gadfly
can do it with ```coords.Cartesian(fixed = true)```, which uses Compose,
but how to do it for that?
thanks,
M
Hi, I have a function MarginsRnd. When I try to use the function, it
complains that the types are not correct - but I do not see why. Restarting
Julia and reloading the function does not work. The problem seems to be in
a strangely defined method. When I run whos() I get:
whos()
And there was the error! SOLVED!
The problem was the keyword argument bIN::Array{Int64, 2} = zeros(1,1) ,
which should have been bIN::Array{Int64, 2} = zeros(Int, 1,1)
Best,
Michael
Den tirsdag den 5. januar 2016 kl. 10.33.32 UTC+1 skrev Michael Borregaard:
>
> I think maybe the
The problem is - I never call __MarginsRnd#2__ ! I have no idea where that
list of arguments may be coming from. I am sorry, but I do not even
understand why I get an automatically created __MarginsRnd#2__ method when
the MarginsRnd function only has 1 method?
inkhorn", cflag::ASCIIString = "descend", bIN::Array{Int64,
2} = zeros(1,1), doA = true)
Den tirsdag den 5. januar 2016 kl. 09.59.35 UTC+1 skrev Michael Borregaard:
>
> The problem is - I never call __MarginsRnd#2__ ! I have no idea where that
> list of arguments m
oo(1.0,false)
> 100.0
> foo(1.0,"grue")
> ERROR
>
>
>
> On Tuesday, January 5, 2016 at 4:30:14 PM UTC-5, Michael Borregaard wrote:
>>
>> Hi, sorry I have a simple question, I have tried to RTFM.
>>
>> If I have a function with multiple method
Hi, sorry I have a simple question, I have tried to RTFM.
If I have a function with multiple methods and keyword arguments, all
methods should share the same keyword args, right? How do I write this?
function foo(a::Int; test = true)
2+a
end
function foo(a::AbstractFloat #how do I continue
Love it, thanks.
Hi,
I cannot Pkg.update(), I get the error message:
ERROR: ASTInterpreter can't be installed because it has no versions that
support 0.4.5 of julia. You may need to update METADATA by running
`Pkg.update()`
in error at error.jl:22
in resolve at
It is not a full answer, but you should check ctxpromise() for the size. I
think the distribution is because the canvas is not square and you use relative
positions to specify circle centers. You can set the size parameters in the
context call. Sorry I realise this is really useless in terms of
Sorry for asking a question that should be super-basic, but I have looked
all over the internet for this for an hour now: How does one specify
polynomial terms in glm models?
In R, I would:
y ~ x + I(x^2)
Thanks!
Michael
Note that both of these versions will return an array, allowing for type
stability
Den torsdag den 11. februar 2016 kl. 09.40.27 UTC+1 skrev Michael
Borregaard:
>
> If you are worried about maintaining two versions, that can be solved
> simply:
> function foo(x::Vector{bar})
>
If you are worried about maintaining two versions, that can be solved
simply:
function foo(x::Vector{bar})
#the main code of your function
end
function foo(x::bar)
foo([x])
end
Den onsdag den 10. februar 2016 kl. 13.15.30 UTC+1 skrev Ferran Mazzanti:
>
> Thanks Mauro...
>
> using two
Really sorry, just saw this is identical to Mauro's suggestion :-/
Michael
Den torsdag den 11. februar 2016 kl. 11.39.12 UTC+1 skrev Michael
Borregaard:
>
> Thanks for clarifying that!
> So do you suggest
> [code]
> function foo(x::bar)
> #the function body
> e
Maybe a good time to repost this link:
https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation
In terms of scientific reproducibility, I do not think that saving a
click-and-run package is necessarily the best way to further that. What
about unstated assumptions in your code, or (shiver) bugs? IMHO, submitting
human-readable (i.e. annotated) source code is a stronger way to ensure
I am relieved to hear you what not use it in practice, I was trying really
hard to grasp the utility of it :-) It is a very elegant piece of code,
though.
Den torsdag den 25. februar 2016 kl. 01.18.16 UTC+1 skrev Tom Breloff:
>
> I think he was just referring to the fact that it's "one more
There are many cases where it is convenient to be able to give 0 kwargs. Is
it not better to test for
isempty(a)
when the behavior is undefined for 0 arguments?
I am trying to convert from R to Julia, as i really like Julia and the nice
development going on here. But there are certain operations that are a lot
more complicated to do in Julia, even though they are mainstay (I will do
the several times every day). But I am in doubt if I just don't know
To me, the suggested change seems to conflict intuitively with julia
syntax. When using Julia at the REPL all expressions return a value, which
is confusing at first when coming from othe languages but quickly becomes a
feature. That a function also returns the value of the last statement seems
So in answer to your question you would write
function hello_array{T<:AbstractString}(dat::Vector{T})
map(println, dat)
end
Thanks for responding, both, it is particularly great to get an answer from
the father of mixed models in R and julia!
I do have to say I find the functionality slightly disappointing, though. I
had done what was in the suggested solution, but thought of it as an
unpleasant workaround. Can
I am not seeing your speed-up in R? elapsed is less time, but user
significantly more, and it is the sum that counts.
When executing in parallel the language needs to copy the data to the
workers. If the matrices are large, that takes longer than the speedup of
the parallel execution. See what
AFAIK none of these threads provided an easy and clear resolution. The
latest I could find () ended up with a reques to define a
`Pkg.precompile()` function, but I have not seen that anything new has
happened since.
I could get a Julia 'console' working, which is like an IPython console,
i.e. no graphics or markdown. It had an option to change kernel (for the
notebook I assume) but I couldn't get it to work straight away. Other
people might, or it will be working soon. In the presentation they stressed
I have a hard time figuring out what functions and types accept the
broadcast dot in 0.5. E.g.,
is(1, 2)# false
is.([1, 2], 2) # Bool[false, true]
is("a", "b")#false
is.("["a","b"], "b")#MethodError: no method matching size(::String)
Can anyone give me
Please ignore the erroneous first " in the last code line.
> For a toy example like this, this is reasonable advice.
I know you were not after advice, but wanted to suggest a design change to
Julia. I thought Yichao Yu gave a nice response to that, and I am looking
forward to see the developments he promises. I just thought I would point
out an
I would just
using StatsBase
function shufflerows(a::AbstractMatrix)
n = size(a, 1)
ord = sample(1:n, n, replace = false)
a[ord,:]
end
a = rand(5,5)
shufflerows(a)
To do something like this in Julia, there are several possibilities,
depending what you want to achieve. You could
abstract Cat # we decide hat cat will always have an age variable
type Tiger <: Cat
age::Int
end
meow(c::Cat) = println(c.age)
# then you can
tigre = Tiger(5)
meow(tigre)
You can open esri shapefiles with shapefiles.jl. There is a plotting function
for shapefiles in plotrecipes.jl. You can layer shapefiles to create vector
maps. I am happy to help out if you want to use this.
Thanks for the prompt response, I will go with that then :-)
I actually thought later that I may avoid some of the clutter in approach 2
by adding another level of indirection:
abstract AbstractFoo
type FooData
bar
baz
#... several other fields
end
type FoobarData
barbaz
bazbaz
Thanks for the enlightening discussion. The emerging consensus is to use
example #2, but perhaps use macros to make the syntax easier to read and
maintain. Alternatively, it looks like my idea with having a FoobarData
object as a field would do the job (but would require
Hi, Is this the right forum for troubleshooting / issues with my julia
install?
I have kept having problems with packages giving error on precompile,
rendering julia unusable. I then reinstalled julia-0.5-rc4, and removed my
.julia folder from my home dir to do a fresh install. Now, Julia
Hi,
I am defining a set of types to hold scientific data, and trying to get the
best out of Julia's type system. The types in my example are 'nested' in
the sense that each type will hold progressively more information and thus
allow the user to do progressively more. Like this:
type Foo
That is a pretty massive script to ask people to look at for performance
:-) Try profiling it and identify the most expensive code and post that,
that will be much easier to give feedback on.
Maybe this is useful:
https://github.com/JunoLab/atom-julia-client/blob/master/manual/workflow.md
This is good news, and I am holding my breath for this to be succesful! As
someone from a data-rich science (Ecology), a really good way of
interacting directly with data is the make-or-break for whether I will be
able to persuade my colleagues to make the shift to julia.
Yeesian, this looks really promising! It will be great to follow the
progress of this.
They have updated to 0.2. It works fine for me, I just had to get used to
that to start a julia notebook, I have to first open a new Notebook that
opens with the Python2 kernel, and the 'switch kernel'.
That depends a lot on what analyses you want to do with it afterwards - you
could have an array (of species) of an array (of points) of tuples (the x
and y), which is the most straigthforward thing.
For must uses I would probably use a sparse Boolean matrix, e.g.
visits = [sparse([1,4,8],
Independent approaches and a large number of largely experimental packages
is the nature of open source development, yes, and may provide lots of
creative new solutions. But to keep a technical language useful and
attractive I think it is a very big advantage if there are defined
standards,
The result of CSV should be a DataFrame by default. What return type do
you get?
You can reshape the view. This should be cheap.
Great to see this brought up here, and to read the constructive and
thought-provoking responses from members of the Julia community. I feel
this is highly important and I have thougt a lot about it recently, as I am
writing an invited guest editorial for a leading ecological journal about
how
53 matches
Mail list logo