Re: [R] Help_urgent_how to calculate mean and sd in biomod 2

2017-10-20 Thread Rui Barradas
Hello, This is because myBiomodModelEval_55["ROC","Testing.data",,,] is a vector not an array or matrix. What the error message is saying is that dim() is not returning a value (it's length is not positive, since it cannot be negative length(dim(.)) must be zero). Try it. Or see the class of

[R] Help_urgent_how to calculate mean and sd in biomod 2

2017-10-20 Thread Lara Dutra Silva
Hello I am new in R. I am trying to implement Biomod 2 package. However, I have a doubt. I want to calculate the mean and sd of "Testing.data" (ROC and TSS) > # let's print the ROC scores of all selected models > myBiomodModelEval_55["ROC","Testing.data",,,] RUN1 RUN2 RUN3 RUN4 RUN5 RUN

[R] create a loop

2017-10-20 Thread Marna Wagley
Hi R Users, I do have very big data sets and wanted to run some of the analyses many times with randomization (1000 times). I have done the analysis using an example data but it need to be done with randomized data (1000 times). I am doing manually for 1 times but taking so much time, I wonder

Re: [R] What exactly is an dgCMatrix-class. There are so many attributes.

2017-10-20 Thread C W
Subsetting using [] vs. head(), gives different results. R code: > head(train$data, 5) [1] 0 0 1 0 0 > train$data[1:5, 1:5] 5 x 5 sparse Matrix of class "dgCMatrix" cap-shape=bell cap-shape=conical cap-shape=convex [1,] . .1 [2,] .

Re: [R] What exactly is an dgCMatrix-class. There are so many attributes.

2017-10-20 Thread C W
Thank you for your responses. I guess I don't feel alone. I don't find the documentation go into any detail. I also find it surprising that, > object.size(train$data) 1730904 bytes > object.size(as.matrix(train$data)) 6575016 bytes the dgCMatrix actually takes less memory, though it *looks* li

Re: [R] What exactly is an dgCMatrix-class. There are so many attributes.

2017-10-20 Thread David Winsemius
> On Oct 20, 2017, at 11:11 AM, C W wrote: > > Dear R list, > > I came across dgCMatrix. I believe this class is associated with sparse > matrix. Yes. See: help('dgCMatrix-class', pack=Matrix) If Martin Maechler happens to respond to this you should listen to him rather than anything I wri

Re: [R] What exactly is an dgCMatrix-class. There are so many attributes.

2017-10-20 Thread William Dunlap via R-help
You should not really have worry about the internal structure of such a thing - just treat it like a matrix. E.g., > train$data[1:3,1:3] # dots mean 0's 3 x 3 sparse Matrix of class "dgCMatrix" cap-shape=bell cap-shape=conical cap-shape=convex [1,] . .

[R] What exactly is an dgCMatrix-class. There are so many attributes.

2017-10-20 Thread C W
Dear R list, I came across dgCMatrix. I believe this class is associated with sparse matrix. I see there are 8 attributes to train$data, I am confused why are there so many, some are vectors, what do they do? Here's the R code: library(xgboost) data(agaricus.train, package='xgboost') data(agari

Re: [R] nls() and loop

2017-10-20 Thread J C Nash
Yes, some form of try() is often needed with nls() to avoid scripts stopping. You might also find nlxb() from package nlsr more reliable in finding solutions. It uses analytic derivatives if available if the model is given as an expression, and a Marquardt stabilized solver. But do expect it to

Re: [R] nls() and loop

2017-10-20 Thread Jeff Newmiller
?tryCatch -- Sent from my phone. Please excuse my brevity. On October 20, 2017 7:37:12 AM PDT, Evangelina Viotto wrote: >Hello I´m need fitt growth curve with data length-age. I want to >evaluate >which is the function that best predicts my data, to do so I compare >the >Akaikes of different mo

Re: [R] Error messages using nonlinear regression function (nls)

2017-10-20 Thread Martin Maechler
> PIKAL Petr > on Fri, 20 Oct 2017 13:35:01 + writes: > Thank you Martin. > If I understand correctly, OP could do > wheat.list <- nlsList(Prop ~ SSfpl(end, A, B, xmid, scal), data=wlg) (which is really a different model with one parameter more, and given the relati

Re: [R] Error messages using nonlinear regression function (nls)

2017-10-20 Thread William Dunlap via R-help
The Logistic link does not work well with zero or unit proportions. Try pulling it away from the edges with wlg$Prop <- pmin( 1-1e-10, pmax( 1e-10, w1g$Prop )) Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Oct 19, 2017 at 11:33 PM, PIKAL Petr wrote: > Hi > > Keep your messages in

[R] nls() and loop

2017-10-20 Thread Evangelina Viotto
Hello I´m need fitt growth curve with data length-age. I want to evaluate which is the function that best predicts my data, to do so I compare the Akaikes of different models. I'm now need to evaluate if changing the initial values changes the parameters and which do not allow to estimate the model

Re: [R] Error messages using nonlinear regression function (nls)

2017-10-20 Thread PIKAL Petr
Thank you Martin. If I understand correctly, OP could do wheat.list <- nlsList(Prop ~ SSfpl(end, A, B, xmid, scal), data=wlg) or add some small value to all zeroes wlg$prop < -wlg$Prop+1e-7 wheat.list <- nlsList(prop ~ SSlogis(end,Asym, xmid, scal), data=wlg) which gives fairly reasonable resu

[R] Permission denied with tk_choose.dir

2017-10-20 Thread Jouanin Celine via R-help
Dear R Help list, I'm facing a problem with "tk_choose.dir", I try to find an explanation and a solution. I use :rm(list=ls(all=TRUE)) datawd<-"/mnt/3-Biot/data_input/" setwd(datawd) files<-tk_choose.files(filters = matrix(c("/*.csv",".csv"),1, 2, byrow = TRUE),caption ="Select file with csv for

Re: [R] [FORGED] can't print ggplot with Chinese characters to pdf files

2017-10-20 Thread Martin Møller Skarbiniks Pedersen
On 20 October 2017 at 04:21, John wrote: > > Hi, > >Following Paul's instruction, I have installed the Cairo. I tried to run > the program, and there is no error message at all. I did see the Chinese > title in the plot if I ask my RStudio to show the plot (if I type "p1"), > but the pdf file

Re: [R] Error messages using nonlinear regression function (nls)

2017-10-20 Thread Martin Maechler
> PIKAL Petr > on Fri, 20 Oct 2017 06:33:36 + writes: > Hi > Keep your messages in the list, you increase your chance to get some answer. > I changed your data to groupedData object (see below), but I did not find any problem in it. > plot(wlg) > gives reas

Re: [R] Select part of character row name in a data frame

2017-10-20 Thread Francesca PANCOTTO
I did not need to select the whole character sentence, otherwise I would know how to do it.. from basic introduction to R as you suggest. Grep works perfectly. f. -- Francesca Pancotto, PhD > Il giorno 19 ott 2017, alle ore 18:01, Jeff Newmiller > ha scritto: >

[R] [R-pkgs] gpuR 2.0.0 released

2017-10-20 Thread Charles Determan
Dear R users, I am happy to announce the most recent version of gpuR has been released. There are several new enhancements to the package including the ability to use user written OpenCL kernels. A full list of changes from the NEWS are shown below. API Changes: 1. deviceType, gpuInfo, cpuInfo