similar to: parSapply can't find function

Displaying 20 results from an estimated 100 matches similar to: "parSapply can't find function"

2008 May 07
3
function in nls argument
Greetings R users, maybe there is someone who can help me with this problem: I define a function "optim.fun" and want as output the sum of squared errors between predicted and measured values, as follows: optim.fun <- function (ST04, SM08b, ch2no, a, b, d, E) { predR <- (a*SM08b^I(2)+b*SM08b+d)*exp(E*((1/(283.15-227.13))-(1/(ST04+273.15-227.13)))) abserr
2018 Apr 26
2
kappa
Buenas, ¿alguien sabe qué puede ser este error? data es una df y las columnas 23 y 24 son las que quiero comparar; están bien. testK<-kappa2(data[,c(23,24)], "equal") Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list? -- Dr Manuel Mendoza Department of Biogeography and Global Change National Museum of Natural
2012 Sep 06
2
choose() function returning anomalous results (zero instead of one)
Hello, (Apologies for length, wanted to get all the relevant detail in that I know of). I've been having a lot of trouble with some code for an inventory analysis problem I was doing, and finally came to the conclusion that it appears that choose() is returning incorrect values. Specifically: ------------- Browse[1]> nn [1] 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3
2013 Apr 18
1
snow: cluster initialization
Dear all, I found a strange thing with the snow package. This will work: y = matrix(1:4, 2) cl = makeCluster(rep('localhost', 8), type='SOCK') parMM(cl, y, y) This will not: y = matrix(1:4, 2) ncore = system('nproc') parMM(cl, y, y) Error in cut.default(i, breaks) : invalid number of intervals I also tried: cl = makeCluster(rep('localhost', ncore),
2008 May 09
1
Using lme() inside a function
Dear R-help I'm working on a large dataset which I have divided into 20 subsets based on similar features. Each subset consists of observations from different locations and I wish to use the location as a random effect. For each group I want to select regressors by a stepwise procedure and include a random effect on the intercept. I use stepAIC() and lme(). (The lmer()-function doesn't
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
2008 May 09
2
How can one make stepAIC and lme
Dear R-help I'm working on a large dataset which I have divided into 20 subsets based on similar features. Each subset consists of observations from different locations and I wish to use the location as a random effect. For each group I want to select regressors by a stepwise procedure and include a random effect on the intercept. I use stepAIC() and lme(). (The lmer()-function doesn't
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
2006 Mar 14
1
rar Command Syntax
Hi All, what is wrong with the below? Cheers. Mark Sargent rar -evx "TestKing 640-801 V69.rar" testking604801
2009 Jun 27
3
2 servers cluster
Hi, I am thinking of setting up two servers in load balance mode. I would really appreciate your suggestions and hints... thnx, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20090627/92f7f56c/attachment.html>
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)) :
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
2019 Jun 07
1
Parallel number stream: clusterSetRNGStream
Dear All, Is the following expected behaviour? set.seed(1) library(parallel) cl = makeCluster(5) clusterSetRNGStream(cl, iseed = NULL) parSapply(cl, 1:5, function(i) sample(1:10, 1)) # 7 4 2 10 10 clusterSetRNGStream(cl, iseed = NULL) # 7 4 2 10 10 parSapply(cl, 1:5, function(i) sample(1:10, 1)) stopCluster(cl) The documentation could be read either way, e.g. * iseed: An integer to be
2009 Feb 07
3
New package test results available
We've added a column at http://cran.r-project.org/web/checks/check_summary.html of test results using the Sun Studio compiler: it is intended that these will be updated weekly. The Sun Studio compiler is that used on Solaris: these runs were on the Linux version. All the other platforms are using gcc 4, so this provides an opportunity for checking for use of gcc-specific features and
2014 Jul 02
1
parLapply on sqlQuery (from package RODBC)
R Version : 2.14.1 x64 Running on Windows 7 Connecting to a database on a remote Microsoft SQL Server 2012 The short form of my problem is the following. I have an unordered vectors of names, say: names<-c("A", "B", "A", "C","C") each of which have an id in a table in my db. I need to convert the names to their corresponding ids. I
2007 Apr 24
2
Error in clusterApply(): recursive default argument reference
Hi, I want to compute a distribution of the intersection of a graph and 'randomized' graphs induced by the permutations of node labels (to preserve the graph topology). Since I ll have many permutations to perform, I was thinking of using the snow package and in particular "parSapply" to divide the work between my 4 CPUs. But I get the following error message : Error in
2012 Oct 23
0
Typos/omissions/inconsistencies in man page for clusterApply
Hi, Here are the issues I found: Typos ----- (a) Found: It a parallel version of ?evalq?, "is" missing. (b) Found: 'parLapplyLB', 'parSapplyLB' are load-balancing versions, intended for use when applying ?FUN? to 'parLapplyLB' has no 'FUN' arg (more on this below). (c) Found: 'clusterApply' calls 'fun' on the first