Displaying 20 results from an estimated 900 matches similar to: "snow: cluster initialization"
2013 Apr 18
1
parSapply can't find function
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 = function(x, k) {
pastList = lapply(1:length(x), function(n)
2011 Dec 08
1
How to plot multiple graphs in one go?
I am trying to do this, but it won't work:
> library(lattice)
> elemconc = data.frame(expand.grid(id=1:20, geno=c('exp', 'wt'),
region=c('cor', 'cr', 'spine'), elem=c('fe', 'cu', 'zn')), conc=rnorm(360,
10))
> elemconc$geno = factor(elemconc$geno)
> elemconc$region = factor(elemconc$region)
> for (i in
2011 Dec 23
2
cast in reshape and reshape2
> library(reshape2)
> x = melt(airquality, id=c('month', 'day'))
With reshape I can cast with multiple functions:
> library(reshape)
> cast(x, month+variable~., c(mean,sd))
month variable mean sd
1 5 ozone 23.615385 22.224449
2 5 solar.r 181.296296 115.075499
3 5 wind 11.622581 3.531450
4 5 temp 65.548387
2013 Aug 25
0
"block incomplete" error when compiling R
Dear list,
I am trying to compile R on a 64-bit Ubuntu 13.04 machine and get the
following error:
make[2]: Entering directory
`/home/kaiyin/opt/R-2.15.0/src/library/Recommended'
begin installing recommended package MASS
Error in untar2(tarfile, files, list, exdir) : incomplete block on file
make[2]: *** [MASS.ts] Error 1
make[2]: Leaving directory
2011 Dec 04
1
Complex multiple t tests in a data frame with several id factors
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 do a t test to find whether there
is any difference between the two strains.
Here is what I did (using simulated data as an example):
# create the data frame
> elemconc = data.frame(expand.grid(id=1:3, geno=c('exp',
2011 Nov 23
2
Is there an easier way to iterate over multiple data frames in R?
> 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 -1.89346950 0.33896273
3 -1.69686777 -0.35963008
2014 Nov 10
1
Cursor not behaving properly
I found a strange bug in R recently (version 3.1.2):
As you can see from the screenshots attached, when the cursor passes the
right edge of the console, instead of start on a new line, it goes back to
the beginning of the same line, and overwrites everything after it.
This happens every time the size of the terminal is changed, for example,
if you fit the terminal to the right half of the
2011 Nov 03
1
Why can't this function be used with the 'by' command?
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)
X1 X2
0.4126345 0.2208781
> by(x[,1:2], x$group, shapiro.p)
Error in `[.data.frame`(x, complete.cases(x)) :
2011 Nov 05
1
Correlation between matrices
> 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) =
2010 Dec 07
9
[PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page
This problem is found in meego testing:
http://bugs.meego.com/show_bug.cgi?id=6672
A file in btrfs is mmaped and the mmaped buffer is passed to pwrite to write to the same page
of the same file. In btrfs_file_aio_write(), the pages is locked by prepare_pages(). So when
btrfs_copy_from_user() is called, page fault happens and the same page needs to be locked again
in filemap_fault(). The fix is to
2011 Apr 06
3
[PATCH V2] Btrfs: fix subvolume mount by name problem when default mount subvolume is set
We create two subvolumes (meego_root and meego_home) in
btrfs root directory. And set meego_root as default mount
subvolume. After we remount btrfs, meego_root is mounted
to top directory by default. Then when we try to mount
meego_home (subvol=meego_home) to a subdirectory, it failed.
The problem is when default mount subvolume is set to
meego_root, we search meego_home in meego_root but can not
2001 Nov 25
2
What is this!
I have installed samba 2.2.2 successfully on my linux box and have
tested it perfectly on linux itself (smbclient //hostname/tmp). However,
when I tried "net use x: \\hostname\tmp" on my win2000 professional
laptop, it gave me "There are currently no logon servers available to
service the logon request". What should I do?
Thanks,
Zhong
2011 Nov 24
1
what is wrong with this dataset?
> 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.8933589 -0.5966119
4 m sales
2018 Sep 19
1
[PATCH] drm: nouveau: remove a redundant local variable 'pclks'
The local variable 'pclks' is never used after being assigned.
hence it should be redundant and can be removed.
Signed-off-by: zhong jiang <zhongjiang at huawei.com>
---
drivers/gpu/drm/nouveau/dispnv04/arb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c b/drivers/gpu/drm/nouveau/dispnv04/arb.c
index c79160c..cae8f71
2012 Sep 09
2
Lustre系统管理员培训,中国北京, 2012年10月30日至11月2日/ Lustre Administration and Installation training, Beijing, China, 10/30~11/02 2012
Intel??????????Whamcloud??????????Lustre???????????????Whamcloud???Lustre????????????
????? 2012?10?30? ? 11?2?
???????? ??? ????????2? ??????A?8?
?????????????http://www.whamcloud.com/events/lustre-installation-and-administration-beijing-china/
????????????????
The 1st Lustre Administration and Installation training in Great China area after Intel Corporation acquired Whamcloud will soon be
2008 Jun 08
3
how to important a date file into R
Hi:
I have a data file in the following format. The first three digits stand for the ID of a respondent such as 402, 403. Different respondents may have the same ID. Followed the ID are 298 single digit number ranging from 1 to 5. My question is how to read this data file into R. I tried "scan" and "read" but they do not work because the numbers in the file are not
2011 Nov 02
1
nproc parameter in efpFunctional
Hello all,
could anyone explain the exact meaning of parameter nproc? Why different
values of nproc give so different critical values, i.e.
meanL2BB$computeCritval(0.05,nproc=3)
[1] 0.9984853
meanL2BB$computeCritval(0.05,nproc=1)
[1] 0.4594827
The strucchange-package description gives "integer specifying for which
number of processes Brownian motions should be simulated" - do I need
2006 Oct 13
3
Rmpi performance
Dear R users,
we are trying to do some parallel computing using library(snow).
In particular we have a cluster with 3 nodes
>cl <- makeCluster(3, type = "MPI")
3 slaves are spawned successfully. 0 failed.
and we want to compute the function op_mat (see below) first with the
master and then with the cluster using system.time for checking the
computational performance.
2005 Jul 04
1
question about boxplot axis
Hi:
I have a question making side by side boxplot.
My response is numeric and I want to make a side by
side boxplot of it accroding to a factor vector. So,
there are several boxplots on the same plot. Each
boxplot is with respect to one level for a factor. The
levels of
the factor are some characters. When I make the plot,
the boxplots are arranged according to the alphabetic
order of the
2015 Nov 25
2
limits.conf and AD domain groups
I am using a member server with AD as my source of accounts. ssh logins
work great.
Yesterday, one of my students wanted to see what a fork bomb was and so now
I need to place ulimits on place. Attempts to use AD domain groups fail. So
I'm not sure this is an issue for samba+winbind or for
/etc/security/limits.conf and pam.
Here's what I have added in limits.conf
# -- fix fork bomb