Sorry, I got some new error:
Error in cut.default(i, breaks) : 'breaks' are not unique
>>>traceback()
20: stop("'breaks' are not unique")
19: cut.default(i, breaks)
18: cut(i, breaks)
17: split.default(i, cut(i, breaks))
16: split(i, cut(i, breaks))
15: structure(split(i, cut(i, breaks)), names =
On 29/04/2013 2:16 PM, Kaiyin Zhong (Victor Chung) wrote:
Hi, Uwe.
I still don't get how this can be done correctly. Here is what I tried.
In the file funcs.R, define these functions:
library('modeest')
x = vector(length=500)
x = sapply(x, function(i) i=sample(c(1,0), 1))
pastK = function(n, x
Oh, indeed, that IS the problem. Thank you!!!
Best regards,
Kaiyin ZHONG
--
FMB, Erasmus MC
k.zh...@erasmusmc.nl
kindlych...@gmail.com
On Mon, Apr 29, 2013 at 8:22 PM, David Winsemius wrote:
>
> On Apr 29, 2013, at 11:16 AM, Kaiyin Zhong (Victor Chung) wrote:
>
> >
On Apr 29, 2013, at 11:16 AM, Kaiyin Zhong (Victor Chung) wrote:
> Hi, Uwe.
>
> I still don't get how this can be done correctly. Here is what I tried.
>
> In the file funcs.R, define these functions:
>
> library('modeest')
> x = vector(length=500)
> x = sapply(x, function(i) i=sample(c(1,0),
Hi, Uwe.
I still don't get how this can be done correctly. Here is what I tried.
In the file funcs.R, define these functions:
library('modeest')
x = vector(length=500)
x = sapply(x, function(i) i=sample(c(1,0), 1))
pastK = function(n, x, k) {
if (n>k) { return(x[(n-k):(n-1)]) }
else {ret
On 23.04.2013 15:00, Kaiyin Zhong (Victor Chung) wrote:
Thanks for the reply.
How can i make the functions known to all nodes?
See ?clusterEvalQ
you may also want to try the parallel packages.
Best,
Uwe Ligges
Best regards,
Kaiyin ZHONG
---
Thanks for the reply.
How can i make the functions known to all nodes?
Best regards,
Kaiyin ZHONG
--
FMB, Erasmus MC
k.zh...@erasmusmc.nl
kindlych...@gmail.com
On Tue, Apr 23, 2013 at 2:43 PM, Uwe Ligges wrote:
>
>
> On 18.04.2013 11:11, Kaiyin Zhong (Victor Chun
On 18.04.2013 11:11, Kaiyin Zhong (Victor Chung) wrote:
Here is the code, assuming 8 cores in the cpu.
library('modeest')
library('snow')
cl = makeCluster(rep('localhost', 8), 'SOCK')
x = vector(length=50)
x = sapply(x, function(i) i=sample(c(1,0), 1))
pastK = function(n, x, k) {
if (n>
Here is the code, assuming 8 cores in the cpu.
library('modeest')
library('snow')
cl = makeCluster(rep('localhost', 8), 'SOCK')
x = vector(length=50)
x = sapply(x, function(i) i=sample(c(1,0), 1))
pastK = function(n, x, k) {
if (n>k) { return(x[(n-k):(n-1)]) }
else {return(NA)}
}
predR
9 matches
Mail list logo