The documentation
here http://julia.readthedocs.org/en/latest/manual/introduction/ works
beautifully, you can search it by keywords, etc. and every function in the
standard library is represented. As for user-defined functions, I'm not
sure what we can do about that except for looking at the code, etc.
Also, I'm not entirely certain what your code is meant to do. It looks
naively like you could work exclusively with arrays, not a DataFrame.
Arrays are much faster and more efficient. It's not *awful* to just say
newStates = zeros(n,k) and then do all your computation using the original
states array, saving the results in newStates. Then say states = newStates
and your ready for the next run.
On Tuesday, July 8, 2014 2:26:16 PM UTC-7, Steve Bellan wrote:
>
> Hi, I am writing an MCMC likelihood function that comes from a dynamic
> model. I have about 50 state variables for several thousand individuals
> that each get updated iteratively over time. However, some individuals'
> variables get updated at some type steps but not at others (because they
> are inactive). I'd like to be able to write something of the sort
>
> k = 50
> n = 1000
> states = rand(n, k)
> typeof!(states, "DataFrame")
>
> function dynupdate(states, active)
> with(states[active,:], {
> x1 = x1 .* 2
> x2 = par1 .* x3 .*x 2
> x3 = par3 .* (x1 + x3)^2})
> return(states)
> }
>
>
> Forgive the sloppy coding, I'm quite new to Julia. I'm not sure the best
> way to do this. The other complication is that I want x1,x2,x3 to all
> depend on their value at the last time period. If I update x1 first, then
> x2 will depend on the updated version of x1 and not the past one. I could
> obviously create x1new, x2new, x3new and then update them in states at the
> end, but I'm wondering whats the fastest, most elegant way to do this.
>
> Also, I am struggling to understand how to navigate function documentation
> in Julia. When I type help(with) it gives me almost no information on that
> function. with() is not an easy thing to search for on google either so I
> have no idea what with() does. What's the best way to learn more about
> functions in julia? In R, I rely on the help() and example() a lot.
>
> Thanks!
>
> Steve
>