[R] (no subject)

2014-08-17 Thread Kaiyin Zhong (Victor Chung)
ializing object in class... Error in file(file, "rt") : invalid 'description' argument Error : unable to load R code in package ‘testLoadRef’ ERROR: lazy loading failed for package ‘testLoadRef’* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resourc

[R] "block incomplete" error when compiling R

2013-08-25 Thread Kaiyin Zhong (Victor Chung)
were encounter when compiling several versions including 3.0.0 and 2.15.3. The commands used are those introduced in R-admin: ./configure make or ./configure LIBnn=lib make Any ideas? Thanks! Best regards, Kaiyin ZHONG -- Forensic Molecular Biology,

[R] gpuHclust slower than hclust

2013-06-04 Thread Kaiyin Zhong (Victor Chung)
7 0.260 6.790 The gpu on my machine is Telsa C5020 from NVIDIA. Best regards, Kaiyin ZHONG -- FMB, Erasmus MC k.zh...@erasmusmc.nl kindlych...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.or

[R] hclust segfault when using rpuDist

2013-06-04 Thread Kaiyin Zhong (Victor Chung)
"Diag")= logi FALSE ..- attr(*, "Upper")= logi FALSE ..- attr(*, "method")= chr "euclidean" ..- attr(*, "call")= language rpuDist(points = m) Best regards, Kaiyin ZHONG -- FMB, Erasmus MC k.zh...@erasmusmc.nl kindl

Re: [R] parSapply can't find function

2013-04-29 Thread Kaiyin Zhong (Victor Chung)
i, envir)) 1: source("testing.R") The sequential run was ok. Best regards, Kaiyin ZHONG -- FMB, Erasmus MC k.zh...@erasmusmc.nl kindlych...@gmail.com On Mon, Apr 29, 2013 at 8:26 PM, Duncan Murdoch wrote: > On 29/04/2013 2:16 PM, Kaiyin Zhong (Victor Chung

Re: [R] parSapply can't find function

2013-04-29 Thread Kaiyin Zhong (Victor Chung)
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)

Re: [R] parSapply can't find function

2013-04-29 Thread Kaiyin Zhong (Victor Chung)
ror in checkForRemoteErrors(val) : 12 nodes produced errors; first error: could not find function "predR" Best regards, Kaiyin ZHONG -- FMB, Erasmus MC k.zh...@erasmusmc.nl kindlych...@gmail.com On Tue, Apr 23, 2013 at 3:44 PM, Uwe Ligges wrote: >

Re: [R] parSapply can't find function

2013-04-23 Thread Kaiyin Zhong (Victor Chung)
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 Zhon

Re: [R] snow: cluster initialization

2013-04-18 Thread Kaiyin Zhong (Victor Chung)
ok, got it: library(multicore) ncore = multicore:::detectCores() Best regards, Kaiyin ZHONG -- FMB, Erasmus MC k.zh...@erasmusmc.nl kindlych...@gmail.com On Thu, Apr 18, 2013 at 3:13 PM, Jon Olav Skoien < jon.sko...@jrc.ec.europa.eu> wrote: > I dont t

Re: [R] snow: cluster initialization

2013-04-18 Thread Kaiyin Zhong (Victor Chung)
Thanks. So is there a way to get the number of cpu cores in R? Best regards, Kaiyin ZHONG -- FMB, Erasmus MC k.zh...@erasmusmc.nl kindlych...@gmail.com On Thu, Apr 18, 2013 at 3:18 PM, Jon Olav Skoien < jon.sko...@jrc.ec.europa.eu> wrote: > I also want

[R] parSapply can't find function

2013-04-18 Thread Kaiyin Zhong (Victor Chung)
r = parSapply(cl, k, function(i) predR(x, i)) #r = sapply(k, function(i) predR(x, i)) } r = testK() stopCluster(cl) Here is the error: Error in checkForRemoteErrors(val) : 8 nodes produced errors; first error: could not find function "predR" Best regards, Kaiyin ZHONG --

[R] snow: cluster initialization

2013-04-18 Thread Kaiyin Zhong (Victor Chung)
: invalid number of intervals I also tried: cl = makeCluster(rep('localhost', ncore), type='SOCK') cl = makeCluster(rep('localhost', as.integer(ncore)), type='SOCK') no luck. Could anyone please help? Thanks! Best regards, Kaiyin ZHONG --

[R] cast in reshape and reshape2

2011-12-23 Thread Kaiyin Zhong
ozone 31.448276 24.141822 18 9 solar.r 167.43 79.118280 19 9 wind 10.18 3.461254 20 9 temp 76.90 8.355671 Is there a way to do the same job

[R] How to plot multiple graphs in one go?

2011-12-08 Thread Kaiyin Zhong
) > elemconc$geno = factor(elemconc$geno) > elemconc$region = factor(elemconc$region) > for (i in as.character(levels(elemconc$region))) { + densityplot(data=elemconc, ~conc, subset=region==i) + } -- Kaiyin Zhong --

Re: [R] Complex multiple t tests in a data frame with several id factors

2011-12-04 Thread Kaiyin Zhong
; suggestion above. > > Cheers, > Bert > > On Sun, Dec 4, 2011 at 7:36 AM, Kaiyin Zhong wrote: >> I have assayed the concentrations of various metal elements in >> different anatomic regions of two strains of mice. Now, for each >> element, in each region, I want to

[R] Complex multiple t tests in a data frame with several id factors

2011-12-04 Thread Kaiyin Zhong
; "wt" # do the t test using the grouping factor > x = tapply(elemconc$conc, elemconc[c('elem', 'region')], function(x) > t.test(x~tmpgeno) ) > x region elem brain spine fe List,9 List,9 cu List,9 List,9 zn List,9 List,9 I believe I have made no

[R] what is wrong with this dataset?

2011-11-23 Thread Kaiyin Zhong
> d = data.frame(gender=rep(c('f','m'), 5), pos=rep(c('worker', 'manager', 'speaker', 'sales', 'investor'), 2), lot1=rnorm(10), lot2=rnorm(10)) > d gender pos lot1 lot2 1 f worker 1.1035316 0.8710510 2 m manager -0.4824027 -0.2595865 3 f speaker 0.893358

[R] Is there an easier way to iterate over multiple data frames in R?

2011-11-23 Thread Kaiyin Zhong
> for (d in paste('df', 1:3, sep='')) { + assign(d, as.data.frame(replicate(3, rnorm(4 + } > dats = list(df1,df2,df3) > for (i in 1:length(dats)) { + names(dats[[i]]) = c('w', 'l', 'h') + } > dats [[1]] w l h 1 1.24319239 -0.05543649 0.05409178 2 0.05124331

Re: [R] Correlation between matrices

2011-11-06 Thread Kaiyin Zhong
y = y)) + >   geom_point(size = 2.5) + >   geom_abline(data = coefs, aes(intercept = b0, slope = b1), >                             size = 1) + >   facet_grid(elem ~ regions) > > # Same plot in lattice: > library('lattice') > library('latticeExtra') > p <-

[R] Correlation between matrices

2011-11-05 Thread Kaiyin Zhong
> regions = c('cortex', 'hippocampus', 'brain_stem', 'mid_brain', 'cerebellum') > mice = paste('mouse', 1:5, sep='') > for (n in c('Cu', 'Fe', 'Zn', 'Ca', 'Enzyme')) { + assign(n, as.data.frame(replicate(5, rnorm(5 + } > names(Cu) = names(Zn) = names(Fe) = names(Ca) = names(Enzyme) = regions

[R] Why can't this function be used with the 'by' command?

2011-11-03 Thread Kaiyin Zhong
Why can't this function be used with the 'by' command? > x = array(runif(16), dim=c(8,2)) > x = data.frame(x) > x$group = rep(c('wt', 'app'), each=4) > shapiro.p = function(x) shapiro.test(x)[[2]] > apply(x[,1:2], 2, shapiro.p) X1X2 0.4126345 0.2208781 > by(x[,1:2], x$group, shapi