Re: [R] by funtion

2010-04-28 Thread Tengfei Yin
Hi, Thanks, actually I mentioned in the reply, you need to turn the matrix into data frame in the end if use this method. e.g > df=data.frame(name=c('AA','BB','AA'),c1=c(23,123,203),c2=c(54,5,98),c3=c(0.999,1,0.79),c4=c(0.78,0.99,0.99)) > aa=by(df[,2:5],df$name,mean) > dd=do.call('rbind',aa) > df

Re: [R] by funtion

2010-04-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.04.2010 08:11:41: > Hi > > you could try > > do.call('rbind',aa) No, No, No. rbind and cbind binds vectors as rows or columns of ***matrix***, result is not a data frame do.call("rbind",aa) X069rutil X102anatas 105 26.97.9 200

Re: [R] non linear estimation

2010-04-28 Thread Petr PIKAL
Hi I put a search question about nonlinear programming in R site search and got many answers maybe you could find something which suits your needs. Maybe you could also look at CRAN task view - Optimisation and Mathematical programming Regards Petr r-help-boun...@r-project.org napsal dne 29.0

[R] Odp: by funtion

2010-04-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.04.2010 05:56:23: > Hello, > > I have a data.frame: > namecol1col2col3col4 > AA23540.9990.78 > BB123510.99 > AA203980.790.99 > > I want to get mean value data.frame in terms of name: >

Re: [R] by funtion

2010-04-28 Thread Tengfei Yin
Hi you could try do.call('rbind',aa) then turn the matrix into data frame regards Tengfei On Wed, Apr 28, 2010 at 10:56 PM, Yuan Jian wrote: > Hello, > > I have a data.frame: > namecol1col2col3col4 > AA23540.9990.78 > BB123510.99 > AA203

Re: [R] Can't load "doSMP" from REvolutionR in regular R2.11.0

2010-04-28 Thread Tal Galili
I get the same error and would be happy for a solution as well. Thanks, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-sta

[R] Functions to plot geopotential heights

2010-04-28 Thread Linda Smith
Hi, I obtained some netcdf data from NCEP website (attached here). It contains gridded geopotential heights at 1 level with 9 lats and 13 lons, and 489 time steps (so the dimension is 489 1 9 13). The website could plot the data into contour lines (see attached figure). I wonder whether R has certa

[R] by funtion

2010-04-28 Thread Yuan Jian
Hello, I have a data.frame: name    col1    col2    col3    col4 AA    23    54    0.999    0.78 BB    123    5    1    0.99 AA    203    98    0.79    0.99 I want to get mean value data.frame in terms of name: name    col1    col2    col3    col4 AA    113.  76.   0.8945   0.8850 BB  

Re: [R] Problem with optimization (constrOptim)

2010-04-28 Thread Nikhil Kaza
fr does not return a scalar. Nikhil On Apr 28, 2010, at 3:35 AM, Człowiek Kuba wrote: Hello, I have the following problem: I have a set of n matrix equations in the form of : [b1] = [A] * [b0] [b2] = [A] * [b1] etc. vertical vectors [b0], [b1], ... are GIVEN. We try to estimate matrix A.

Re: [R] Convert character vector into string

2010-04-28 Thread Ista Zahn
Hi Ian, I would use paste() for this: > x <- c("a","b","c") > x.s <- paste(x, collapse=" ") > x.s [1] "a b c" -Ista On Thu, Apr 29, 2010 at 4:21 AM, Ian Seow wrote: > Hi, how do I convert a character vector into a string? > > c("a","b","c")  into "a b c" > > Thanks! > >        [[alternative HT

[R] Sweave question

2010-04-28 Thread Felipe Carrillo
Hi: I am using Sweave and texi2dvi to generate a LaTeX document but can't find the way to hide the graphics while the R chunks are being executed. I thought results=hide would do it but that't not the case. If I do: \begin{figure}[h] <>= a < rnorm(1000) plot(a) @ \caption{Weekly estimates.} \label

Re: [R] Convert character vector into string

2010-04-28 Thread Nikhil Kaza
?cat On Apr 28, 2010, at 11:21 PM, Ian Seow wrote: Hi, how do I convert a character vector into a string? c("a","b","c") into "a b c" Thanks! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.c

[R] Convert character vector into string

2010-04-28 Thread Ian Seow
Hi, how do I convert a character vector into a string? c("a","b","c") into "a b c" Thanks! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Help in web browser

2010-04-28 Thread Chintanu
Hi, I have recently updated to R 2.10.1 in my windows system. Since then, whenever I look for help (e.g., by using ? "Function" command), the information is displayed by opening a web-browser. However, I rather would prefer to have the information in the usual pop-up style. Is there a way to set/d

[R] BB package

2010-04-28 Thread Roslina Zakaria
Hi I would like to solve a system of nonlinear equations below using dfsane function   mn <- 142.36; vr <- 9335.69 ; sk <- 0.81;  kur <- 0.25 test_fn <- function(p) {    f <- rep(NA, length(p))     f[1] <- p[1]*(p [2]+p[3])- mn   f[2] <- - vr + 2*p[1]*p[2]*p[3]*(p[4]-1)+p[1]*(p[2]+p[3])^2   f[3

Re: [R] non linear estimation

2010-04-28 Thread JamesHuang
any suggestion? actually I just wanna know if there is a package for non linear estimation with restriction, thanks. I am a new for R -- View this message in context: http://r.789695.n4.nabble.com/non-linear-estimation-tp2072136p2074911.html Sent from the R help mailing list archive at Nabbl

[R] Flexmix - mixture modeling

2010-04-28 Thread Travis Simmons
I am trying to set up a mixture model using flex mix. I have a response vector Y, a set of predictors X and grouping variables Z. When i try to run flexmix i get the error below.Am i coding it wrong? fit1 <- flexmix(formula=Y~X|Z, data = data, k=3, cluster = NULL, model=NULL, concomitant=NULL, co

[R] variable importance in Random Forest

2010-04-28 Thread Changbin Du
HI, Dear Andy, I run the RandomFOrest in R, and get the following resutls in variable importance: What is the meaning of MeanDecreaseAccuracy and MeanDecreaseGini? I found they are raw values, they are not scaled to 1, right? Which column if most similar to the variable rel.influence in Boosti

Re: [R] Selecting rows based on contents of string

2010-04-28 Thread David Winsemius
On Apr 28, 2010, at 3:07 AM, Albert-Jan Roskam wrote: Hi, There's probably an easier or more readable way to do it, but: df <- data.frame(cbind(letters, var= runif(26, 2, 3))) df[df$letters[grep("[G]", df$letters, ignore.case=TRUE)],] To my eyes that appears a bit redundant. Wouldn't this ap

[R] Can't load "doSMP" from REvolutionR in regular R2.11.0

2010-04-28 Thread Tao Shi
Hi list, I was testing out the "doSMP" package from REvolutionR in my regular R2.11.0 installation and I got the following error message.  Well, one obvious thing is that R2.11.0 was built using "i386-pc-mingw32" which is different from what revoIPC used.  I could just use REvolutionR, but all

[R] -network- package in R: removing nodes

2010-04-28 Thread Rick L
Dear all, If you have experience with the -network- package, can you show me how to remove nodes based on their degrees? For instance, removing all nodes with an out-degree or in-degree of 1? Thank you very much for your help! Rick __ R-help@r-p

Re: [R] Multiple cex sizes in main for xyplot?

2010-04-28 Thread Felix Andrews
I don't think there's a much better way to do it... but this seems to work: xyplot((0:1)~(0:1), main = textGrob(lab=c("Some Text","\nSome More Text"),x=c(0.5,0.5), gp=gpar(cex=c(1.2,1.0), lineheight=2)) ) -Felix On 29 April 2010 08:06, Bert Gunter wrote: >

Re: [R] multiple paired t-tests without loops

2010-04-28 Thread Daniel Malter
Hi Matt, see the example below. It took me a while to figure it out. I suggest you carefully examine the example step by step. It computes t-values for dataset with 3 variables and 8 unique combinations of two binning variables. The code should extend easily to larger datasets. Also, it uses the e

Re: [R] problem with installing clim.pact

2010-04-28 Thread David Winsemius
Did you look at that version number? -- David. On Apr 28, 2010, at 5:46 PM, Linda Smith wrote: Hi I tried to use install.packages('clim.pact'), but got following (whereas it was installed properly on my windows machine) install.packages('clim.pact') Warning message: In install.packages

Re: [R] operator problem within function

2010-04-28 Thread David Winsemius
On Apr 28, 2010, at 5:45 PM, David Winsemius wrote: On Apr 28, 2010, at 5:31 PM, Bunny, lautloscrew.com wrote: Dear all, i have a problem with processing dataframes within a function using the "$". Here´s my code: recode_items = function(dataframe,number,medium=2){ # t

Re: [R] unexpected result from format(x, digits)

2010-04-28 Thread Duncan Murdoch
On 28/04/2010 6:48 PM, Steve Taylor wrote: Ted wrote: In the second, 0.08953 rounds (to 2 significant digits) to 0.090, which can be printed without further loss of precision as 0.09 while giving the other numbers 2 significant digits. I guess I'm disagreeing with the idea of dropping t

Re: [R] unexpected result from format(x, digits)

2010-04-28 Thread Steve Taylor
Ted wrote: > In the second, 0.08953 rounds (to 2 significant digits) to 0.090, > which can be printed without further loss of precision as 0.09 > while giving the other numbers 2 significant digits. I guess I'm disagreeing with the idea of dropping the trailing zero. It should be retained, since

[R] problem with installing clim.pact

2010-04-28 Thread Linda Smith
Hi I tried to use install.packages('clim.pact'), but got following (whereas it was installed properly on my windows machine) > install.packages('clim.pact') Warning message: In install.packages("clim.pact") : package ‘clim.pact’ is not available > version _ platform x86_64-un

Re: [R] operator problem within function

2010-04-28 Thread David Winsemius
On Apr 28, 2010, at 5:31 PM, Bunny, lautloscrew.com wrote: Dear all, i have a problem with processing dataframes within a function using the "$". Here´s my code: recode_items = function(dataframe,number,medium=2){ # this works q<-paste("columna",number,sep="") D

[R] operator problem within function

2010-04-28 Thread Bunny, lautloscrew.com
Dear all, i have a problem with processing dataframes within a function using the "$". Here´s my code: recode_items = function(dataframe,number,medium=2){ # this works q<-paste("columna",number,sep="") # this does not work, particularly because "dataframe" is n

Re: [R] unexpected result from format(x, digits)

2010-04-28 Thread Ted Harding
Follow-up: You can strip the quotation marks from the output, if you want, by wrapping the formatC() command in cat(). Example: formatC(X,3,format="f") # [1] "1.865" "0.405" "0.147" "1.731" "0.090" cat(formatC(X,3,format="f"),"\n") # 1.865 0.405 0.147 1.731 0.090 Ted. On 28-Apr-10 22:12:

Re: [R] how to remove the names in the list result

2010-04-28 Thread Jorge Ivan Velez
Hi song song, Try this: do.call(rbind, yourlist) HTH, Jorge On Wed, Apr 28, 2010 at 6:12 PM, song song wrote: > hi,everybody: I get a list as following. For each element of the list, it > has names such as "Var1" and "Freq". May I ask how to remove them? > And, may I ask how to make them fo

[R] how to remove the names in the list result

2010-04-28 Thread song song
hi,everybody: I get a list as following. For each element of the list, it has names such as "Var1" and "Freq". May I ask how to remove them? And, may I ask how to make them form a matrix such as like concatinating them? Thank you! The list I got: [[1]] Var1 Freq 1 -5

Re: [R] unexpected result from format(x, digits)

2010-04-28 Thread Ted Harding
On 28-Apr-10 21:45:12, Steve Taylor wrote: > > Is this a bug somewhere? The format function, using a specific > number of digits, doesn't give sensible results: > > R> set.seed(2);print(x<-rexp(5)) > [1] . > R> format(x,digits=1) > [1] "1.87" "0.40" "0.15" "1.73" "0.09" > R> format(x,digits=2)

[R] Multiple cex sizes in main for xyplot?

2010-04-28 Thread Bert Gunter
Folks: I would like to write two lines of text in two different font sizes (or faces or ...) as the title ("main") of a trellis plot. The following code does it, but not well: xyplot((0:1)~(0:1), main = textGrob(lab=c("Some Text","Some More Text"),y=c(.95,.8), gp=

Re: [R] unexpected result from format(x, digits)

2010-04-28 Thread Steve Taylor
0.08953 to two significant figures is "0.090" not "0.09". Thanks, I'll sprintf instead. From: Duncan Murdoch To:Steve Taylor CC: Date: 29/Apr/2010 9:53a Subject: Re: [R] unexpected result from format(x, digits) On 28/04/2010 5:45 PM, Steve Taylor wrote: > > Is this a bug somewhere? The for

[R] results=hide?

2010-04-28 Thread Felipe Carrillo
Hi: I am using Sweave and texi2dvi to generate a LaTeX document but can't find the way to hide the graphics while the R chunks are being executed. I thought results=hide would do it but that't not the case. If I do: \begin{figure}[h] <>= a < rnorm(1000) plot(a) @ \caption{Weekly estimates.} \label

Re: [R] unexpected result from format(x, digits)

2010-04-28 Thread Duncan Murdoch
On 28/04/2010 5:45 PM, Steve Taylor wrote: Is this a bug somewhere? The format function, using a specific number of digits, doesn't give sensible results: I don't see the error. In all examples, the smallest value is 0.08953, and it appears to be rendered to the requested number of signi

Re: [R] NLS &quot;Singular Gradient&quot; Error

2010-04-28 Thread Ben Bolker
bsnrh leeds.ac.uk> writes: > > > Hi Ben, > > Your book refers to the mle function in the emdbookx package. I was > wondering if it's possible to find that package on the internet? > > Many thanks, > Neal If the (draft) PDF says that, it's an error. See the mle2 function in the bbmle pack

[R] unexpected result from format(x, digits)

2010-04-28 Thread Steve Taylor
Is this a bug somewhere? The format function, using a specific number of digits, doesn't give sensible results: R> set.seed(2);print(x<-rexp(5)) [1] 1.86535 0.40475 0.14665 1.73071 0.08953 R> format(x,digits=1) [1] "1.87" "0.40" "0.15" "1.73" "0.09" R> format(x,digits=2) [1] "1.87" "0.40" "0.

Re: [R] problems accessing MS Access 2003 database with RODBC

2010-04-28 Thread Marc Schwartz
On Apr 28, 2010, at 3:38 PM, boris.vasil...@forces.gc.ca wrote: > > >> -Original Message- >> From: Marc Schwartz [mailto:marc_schwa...@me.com] >> Sent: Monday, 26, April, 2010 13:47 PM >> To: Vasiliev b...@cefcom h...@ottawa-hull >> Cc: r-help@r-project.org; Ripley Prof Brian >> Subject

Re: [R] problems accessing MS Access 2003 database with RODBC

2010-04-28 Thread Boris.Vasiliev
> -Original Message- > From: Marc Schwartz [mailto:marc_schwa...@me.com] > Sent: Monday, 26, April, 2010 13:47 PM > To: Vasiliev b...@cefcom h...@ottawa-hull > Cc: r-help@r-project.org; Ripley Prof Brian > Subject: Re: [R] problems accessing MS Access 2003 database with RODBC > > On Ap

[R] Interaction terms in logistic regression using glm

2010-04-28 Thread Andrew Miles
I recently became aware of the article by Ai and Norton (2003) about how interaction terms are problematic in nonlinear regression (such as logistic regression). They offer a correct way of estimating interaction effects and their standard errors. My question is: Does the glm() function t

[R] heatmap.2

2010-04-28 Thread carol white
Hi, Does heatmap.2 function combine all variables into a single overall measure of dissimilarity (regardless of dissimilarity) between two observations as explained in The elements of statistical learning, Hastie et al, 2001, pp457? Does this function calculate the dissimilarity between observat

[R] Error loading RMySQL

2010-04-28 Thread Ted Byers
I have R 2.10.1 and 2.9.1 installed, and both have RMySQL packages installed. I script I'd developed using an older version (2.8.?, I think) used RMySQL too and an older version of MySQL (5.0.?), and worked fine at that time (about a year and a half ago +/- a month or two). But now, when I run it

Re: [R] Generating a model fitness score when using svyglm?

2010-04-28 Thread Thomas Lumley
On Wed, 28 Apr 2010, Brad Fulton wrote: Is there a recommended way to demonstrate improvements in goodness of fit when using svyglm? No. But then, I may be the wrong person to ask, since I wouldn't use AIC, BIC, CIC, DIC, EIC, for independently sampled data either. In my view, you are

Re: [R] function which saves an image of a dgtMatrix as png

2010-04-28 Thread Douglas Bates
image applied to a sparseMatrix object uses lattice functions to create the image. As described in R FAQ 7.22 you must use print(image(x)) or show(image(x)) or even plot(image(x)) when a lattice function is called from within another function. On Wed, Apr 28, 2010 at 1:20 PM, Gildas Mazo wr

Re: [R] Question on: Random Forest Variable Importance for RegressionProblems

2010-04-28 Thread Greg Snow
The importance measures show how much MSE or Impurity increase when that variable is randomly permuted. If you randomly permute a variable that does not gain you anything in prediction, then predictions won't change much and you will only see small changes in impurity and mse. On the other han

Re: [R] Generating a model fitness score when using svyglm?

2010-04-28 Thread Brad Fulton
So are you saying that one way to estimate goodness of fit would be to run each of models using glm() and compare their BIC scores? Is there a recommended way to demonstrate improvements in goodness of fit when using svyglm? Thanks Brad -- View this message in context: http://r.789695.n4.nabb

Re: [R] Generating a model fitness when score using svyglm?

2010-04-28 Thread Thomas Lumley
On Wed, 28 Apr 2010, Brad Fulton wrote: Does anyone know how to calculated a BIC score (or an equivalent model fitness score) when using svyglm for logistic regressions? No. That is, the model is not fitted by maximum likelihood, so BIC doesn't approximate posterior probabilities. Now, t

Re: [R] Size limitations for model.matrix?

2010-04-28 Thread Matthew Keller
Hi Gerald, A matrix and an array *are* vectors that can be indexed by 2+ indices. Thus, matrices and arrays are also limited to 2^31-1 elements. You might check out the bigmemory package, which can help with these issues... Matt On Wed, Apr 28, 2010 at 11:01 AM, wrote: > > Hello, > > I am r

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread bsnrh
Hi Ben, Your book refers to the mle function in the emdbookx package. I was wondering if it's possible to find that package on the internet? Many thanks, Neal -- View this message in context: http://r.789695.n4.nabble.com/NLS-Singular-Gradient-Error-tp2069029p2073544.html Sent from the R help

[R] other methods for dist()?

2010-04-28 Thread Vivek Ayer
Hi all, I was wondering if there's a way to specify other metrics for the method for the dist command other than the standard euclidean, manhattan, canberra, etc. Specifically, I'd to generate a distance matrix using the metrics from information theory, e.g., KL-divergence or something similar to

[R] relative influence plot

2010-04-28 Thread Changbin Du
HI, Dear Greg, I have one question about the variable relative influence plot: THE following is the rel.inf value of 25 variables, but wen I plot, not all the variables are labeled. i.e. num_genes, wg, hydrophob_per etc are not labeled on the y-axis. also the variables are labeled vertically,

Re: [R] Question on: Random Forest Variable Importance for RegressionProblems

2010-04-28 Thread Mareike Ließ
Well, explanation on "importance" says, that for regression the first column (%IncMSE) is the mean decrease in accuracy and the second ("IncNodePurity") the mean decrease in MSE. Dose not make much sense at all. I do not know what "%IncMSE" stands for. Alright, MSE= mean square error", but of w

[R] function which saves an image of a dgtMatrix as png

2010-04-28 Thread Gildas Mazo
Hi, I'm getting crazy: This does work: library(Matrix) a1<-b1<-c(1,2) c1<-rnorm(2) aDgt<-spMatrix(ncol=3,nrow=3,i=a1,j=b1,x=c1) png("myImage.png") image(aDgt) dev.off() But this doesn't !!! f<-function(x){ png("myImage.png") image(x) dev.off() } f(aDgt) My image is saved as a text file and co

Re: [R] Problem with time in coxph/survfit

2010-04-28 Thread Héloïse Gauvin
Hi! well I found the solution, times from my data are generated by a Gompertz distribution and have a lots of decimals. When they go through the survfit function times returned by survfit have only 13 decimals so when my times are compared to those ones it leads to false. That's it... so simple.

Re: [R] packages gdata / gtools - installation in R 2.11.0

2010-04-28 Thread Gabor Grothendieck
The development version of gtools in the subversion/svn repository here: https://r-gregmisc.svn.sourceforge.net/svnroot/r-gregmisc/trunk/gtools does pass R CMD CHECK on "R version 2.11.0 Patched (2010-04-26 r51822)" The development version of gdata in the subversion/svn repository here: https

Re: [R] Combining ggplot2 objects and/or extracting layers

2010-04-28 Thread hadley wickham
Hi Marshall, It sounds like an interesting idea. I would approach it in a slightly different way. I'd recommending writing a function that returns a geom_bar object - that way you can easily add it on to any existing plot, specifying the appropriate parameters. If you just wanted to plot that l

Re: [R] Size limitations for model.matrix?

2010-04-28 Thread Erik Iverson
gerald.j...@dgag.ca wrote: Hello, I am running: R version 2.10.0 (2009-10-26) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 on a RedHat Linux box with 48Gb of memory. I am trying to create a model.matrix for a big model on a moderately large data set. It

Re: [R] multiple paired t-tests without loops

2010-04-28 Thread Greg Snow
Have you considered limiting yourself to the unique combinations rather than every possible permutation? E.g. the permutations 1,2 | 3,4 and 2,1 | 4,3 give redundant results. The combn function (with the FUN) argument may be of help. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Int

[R] Size limitations for model.matrix?

2010-04-28 Thread gerald . jean
Hello, I am running: R version 2.10.0 (2009-10-26) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 on a RedHat Linux box with 48Gb of memory. I am trying to create a model.matrix for a big model on a moderately large data set. It seems there is a size limitati

[R] Errors when trying to open odfWeave documents

2010-04-28 Thread Paul
Hello I tried the odfWeave package today, by running the formatting.odt and example.odt files that are included with the package. They both ran fine, but when I try to open them in my OpenOffice (OpenOffice 3.1.1 on Kubuntu 9.10) I get an error "Format error discovered in the file in sub-doc

Re: [R] help wiht model.matrix -- how to keep missing values?

2010-04-28 Thread David Freedman
I'm not sure what to do with model.matrix, but you might look at some of the code for ols in the rms package. The rms package (from frank harrell), has several options for keeping the NAs in the output from regression models so that residuals are correctly aligned. hth david freedman -- View th

Re: [R] Determining whether "plot.new" has been called

2010-04-28 Thread Barry Rowlingson
On Wed, Apr 28, 2010 at 5:21 PM, Dennis Fisher wrote: > Colleagues > > I have a lengthy script that calls mtext.  Under most circumstances, a > graphics device is open and a plot exists, in which case mtext works as > expected.  However, there are some instances where the graphics device is > o

Re: [R] Bhapkar V test

2010-04-28 Thread TodosLogos
Hi Karl, just today I've quickly implemented the Bhapkar V test in R. You can find the code here: http://statistic-on-air.blogspot.com/2010/04/bhapkar-v-test.html http://statistic-on-air.blogspot.com/2010/04/bhapkar-v-test.html The code is not beatiful, and it works only with three groups (but i

Re: [R] bwplot - scattered

2010-04-28 Thread Erik Iverson
someone wrote: Hi, I'm using the bwplot from the agsemisc package which has a scattered attribute which can be set so that the single dots can bee seen better. my problem is, that I am having so many dots that they still overlap. I could increase the output of the diagram but thats not really m

[R] bwplot - scattered

2010-04-28 Thread someone
Hi, I'm using the bwplot from the agsemisc package which has a scattered attribute which can be set so that the single dots can bee seen better. my problem is, that I am having so many dots that they still overlap. I could increase the output of the diagram but thats not really my intention. has s

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread Walmes Zeviani
I don't know any about you research but I agree with Gabor: the model is identifiable. No*(1-exp(a*(b*Ne-T))) can be reparametrized to No*(1-exp(C*NeD)), where C=a*b and D=a*T. This reduces the model to 3 parameters and can see shown that is a reperametrization of the SSasympOff() defined in R (w

[R] Help with bw plot

2010-04-28 Thread someone
hi everybody, I am having some problems with the bwplot (I am not using the regular panel, but the one from the library agsemisc)... The problem is the following: a.resetplotparams() bwplot( isHost ~ data$time,

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread bsnrh
That's excellent, thank you - precisely what I was looking for. Many thanks indeed. -- View this message in context: http://r.789695.n4.nabble.com/NLS-Singular-Gradient-Error-tp2069029p2073492.html Sent from the R help mailing list archive at Nabble.com.

[R] Determining whether "plot.new" has been called

2010-04-28 Thread Dennis Fisher
Colleagues I have a lengthy script that calls mtext. Under most circumstances, a graphics device is open and a plot exists, in which case mtext works as expected. However, there are some instances where the graphics device is open but no plot exists. When mtext is called, I receive an error

Re: [R] Question on: Random Forest Variable Importance for RegressionProblems

2010-04-28 Thread Liaw, Andy
I would have thought that the help page for importance() is an (the?) obvious place to look... If that description is not clear, please let me know which part isn't clear to you. Andy From: Mareike Lies > > I am trying to use the package RandomForest performing regression. > The variable impo

Re: [R] packages gdata / gtools - installation in R 2.11.0

2010-04-28 Thread Uwe Ligges
On 28.04.2010 17:57, Brian Diggs wrote: On 4/23/2010 2:19 AM, Uwe Ligges wrote: Right, unfortunately package gtools does not pass the checks under R-2.11.0 and hence is not distributed as a binary via CRAN. Either convince the maintainer (CCing Greg) to fix the bug or try to install the packa

[R] Question on: Random Forest Variable Importance for Regression Problems

2010-04-28 Thread Mareike Ließ
I am trying to use the package RandomForest performing regression. The variable importance estimates are given as: "%IncMSE" and "IncNodePurity" Can anyone explain me what these refer to and how they are calculated? I found a lot of information on variable importance measures for clas

Re: [R] Strange zoo behaviour, possible bug?

2010-04-28 Thread Achim Zeileis
On Wed, 28 Apr 2010, Giuseppe Milicia wrote: Hi there, thanks for the reply. I agree that it's essentially a user error. I was really wondering whether the behaviour has changed from past version of zoo and whether it'd be worth to handle this case in a ad-hoc manner. I'm using old code and

Re: [R] Strange zoo behaviour, possible bug?

2010-04-28 Thread Gabor Grothendieck
I am not sure what the general case is here for you but here is a kludge that works in this case: t1 <- zoo(-100, as.POSIXct("2009-12-31")+(2:10)*60*60*24) t2 <- zoo(matrix(0), index(t1)[1]-1) m <- merge(t1, t2, fill = 0) m[,1] + m[,2] By the way, the times in the above are really dates so "Da

Re: [R] packages gdata / gtools - installation in R 2.11.0

2010-04-28 Thread Brian Diggs
On 4/23/2010 2:19 AM, Uwe Ligges wrote: Right, unfortunately package gtools does not pass the checks under R-2.11.0 and hence is not distributed as a binary via CRAN. Either convince the maintainer (CCing Greg) to fix the bug or try to install the package yourself from sources (and fix the bug y

[R] [R-pkgs] New package for ICA uploaded to CRA

2010-04-28 Thread Trevor Hastie
I have uploaded a new package to CRAN called ProDenICA. This fits ICA models directly via product-density estimation of the source densities. This package was promised on page 567 in the 2nd edition of our book 'Elements of Statistical Learning' (Hastie, Tibshirani and Friedman, 2009, Springer)

Re: [R] Strange zoo behaviour, possible bug?

2010-04-28 Thread Giuseppe Milicia
Hi there, thanks for the reply. I agree that it's essentially a user error. I was really wondering whether the behaviour has changed from past version of zoo and whether it'd be worth to handle this case in a ad-hoc manner. I'm using old code and I was a bit surprised I didn't bump on this earl

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread Gabor Grothendieck
Maybe you are applying a completely inappropriate model such as would be the case if Ne/No is not strictly between 0 and 1. All we can do is guess unless you provide a reproducible example which means that if we paste it in from your post it will give the same errors you see. aa means aa, not a*

Re: [R] data frame move columns

2010-04-28 Thread arnaud Gaboury
TY david. Here we go with a correct code! > -Original Message- > From: David Winsemius [mailto:dwinsem...@comcast.net] > Sent: Wednesday, April 28, 2010 5:28 PM > To: arnaud Gaboury > Cc: r-help@r-project.org > Subject: Re: [R] data frame move columns > > > On Apr 28, 2010, at 11:14

[R] non linear estimation

2010-04-28 Thread JamesHuang
hey guys, I got a problem when I tried to estimate parameters in a non linear function with restrictions. The function is: Y=a+(b+c*x)*exp(-d*x), given values of x and y. The least squares method is required and there are many restriction on a,b,c,d, such as a>10, a+b<19,b<3, d>0 and the startin

Re: [R] help in conditional histogram

2010-04-28 Thread Changbin Du
Thanks, Felix! I do find another function definition in my current R console, do you know how to cancel it or delete it from the memory? > head(panel.histogram) 1 function (x, ...) 2 { 3 fc <- hist(x, plot = FALSE, right = F) 4 fcper <- fc$counts/sum(fc$counts) 5 hist(x, data = total

Re: [R] data frame move columns

2010-04-28 Thread arnaud Gaboury
I want the 0s to be at the end or beginning. > -Original Message- > From: Erik Iverson [mailto:er...@ccbr.umn.edu] > Sent: Wednesday, April 28, 2010 5:21 PM > To: arnaud Gaboury > Cc: r-help@r-project.org > Subject: Re: [R] data frame move columns > > > > avprix <- > > structure(list(

[R] rJava (installation?) problem: unable to find the basic String class

2010-04-28 Thread Piotr Chmielowski
Hello, I have experienced the following problem after installing rJava (it being a prerequisite for another package in which I am relly interested). Any helpful thoughts would be appreciated: OS: Windows XP Professional 2002 SP3, have Java 6 Update 20 from Sun, also installed the JDK from http:/

Re: [R] data frame move columns

2010-04-28 Thread David Winsemius
On Apr 28, 2010, at 11:14 AM, arnaud Gaboury wrote: Dear group, Here is my df: avprix <- structure(list(DESCRIPTION = c("CORN Jul/10", "CORN May/10", "ROBUSTA COFFEE (10) Jul/10", "SOYBEANS Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD"), prix = c(-1.5, -1082, 11084, 1983.5, -24

Re: [R] Strange zoo behaviour, possible bug?

2010-04-28 Thread Achim Zeileis
On Wed, 28 Apr 2010, Giuseppe Milicia wrote: Hi all, I bumped into this awkward zoo behaviour. I'd be half tempted to call it a bug, what do you think? The situation could probably be improved on the zoo side but the source of the problem is clearly user error. It's annoying to work arou

Re: [R] NLS &quot;Singular Gradient&quot; Error

2010-04-28 Thread Ben Bolker
Ben Bolker ufl.edu> writes: > You should really try the methods I suggested ... you can get > a closed-form expression for the number eaten as a function of the > other parameters using the Lambert W function. I don't think what > you're doing (with Ne on both sides of the equation) is ever go

Re: [R] Drawing a line with misc3d

2010-04-28 Thread cgenolin
Thanks. I did write a function cuboid, then 3dLine for joining two points, then 3dLines for more points. I do create an asy file with your function saveTrianglesAsASY, then I include the scene.pre in the LaTeX file. So far, everything works fine. My last problem is that I did not manage to get

Re: [R] data frame move columns

2010-04-28 Thread Erik Iverson
avprix <- structure(list(DESCRIPTION = c("CORN Jul/10", "CORN May/10", "ROBUSTA COFFEE (10) Jul/10", "SOYBEANS Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD"), prix = c(-1.5, -1082, 11084, 1983.5, -2464, -118), quantity = c(0, -3, 8, 2, -1, 0), fees = c(-8.64, -30.24, -26.4, -25.9

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread Ben Bolker
Gabor Grothendieck gmail.com> writes: > > What does "no success" mean? > > Some things to try are: > > - since log(1-Ne/No) is linear in Ne and run an lm(log(1-Ne/No) ~ Ne) > and then use the implied values from that or use them as starting > values, > > - reparameterize a*(b*Ne-T) to aa*Ne

[R] data frame move columns

2010-04-28 Thread arnaud Gaboury
Dear group, Here is my df: avprix <- structure(list(DESCRIPTION = c("CORN Jul/10", "CORN May/10", "ROBUSTA COFFEE (10) Jul/10", "SOYBEANS Jul/10", "SPCL HIGH GRADE ZINC USD", "STANDARD LEAD USD"), prix = c(-1.5, -1082, 11084, 1983.5, -2464, -118), quantity = c(0, -3, 8, 2, -1, 0), fees = c(-8.

Re: [R] R with command line

2010-04-28 Thread Duke
On 4/28/10 10:16 AM, peter dalgaard wrote: On Apr 28, 2010, at 4:03 PM, Duke wrote: I just did it, and it said it ignored the arg: $ R R_PROFILE_USER=try.R ARGUMENT 'R_PROFILE_USER=try.R' __ignored__ ... What am I doing wrong? Using Windows syntax on a Unix machi

Re: [R] How to read contents of a text file into a single string?

2010-04-28 Thread Erik Iverson
Dimitri Shvorob wrote: ... Both readLines() and scan() produce a number_of_lines x 1 vector; trying paste(s, collapse = NULL) leaves it unaffected. How can I concatenate vector elements (lines) into a single string? Thank you. Read ?paste, specifically: If a value is specified for ‘col

Re: [R] How to read contents of a text file into a single string?

2010-04-28 Thread Paul Hiemstra
Dimitri Shvorob wrote: ... Both readLines() and scan() produce a number_of_lines x 1 vector; trying paste(s, collapse = NULL) leaves it unaffected. How can I concatenate vector elements (lines) into a single string? Thank you. try collapse = '' cheers, Paul -- Drs. Paul Hiemstra Department

[R] Strange zoo behaviour, possible bug?

2010-04-28 Thread Giuseppe Milicia
Hi all, I bumped into this awkward zoo behaviour. I'd be half tempted to call it a bug, what do you think? It's annoying to work around it :( I wonder if this was the behaviour of older zoo versions, I can't remember coming across this sort of thing... > version _ platform

[R] How to read contents of a text file into a single string?

2010-04-28 Thread Dimitri Shvorob
... Both readLines() and scan() produce a number_of_lines x 1 vector; trying paste(s, collapse = NULL) leaves it unaffected. How can I concatenate vector elements (lines) into a single string? Thank you. -- View this message in context: http://r.789695.n4.nabble.com/How-to-read-contents-of-a-te

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread bsnrh
No success means that I was not successful in changing the outputed error. It had no effect on the model. Thank you for your suggestions; The first returns this error; "Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in foreign function call (arg 4)" I don

Re: [R] NLS "Singular Gradient" Error

2010-04-28 Thread bsnrh
Thank you for your message. This isn't the Rogers equation, although I am not familiar with that particular one. It is from Juliano's (2001) Nonlinear Curve Fitting chapter in Scheiner and Gurevitch. -- View this message in context: http://r.789695.n4.nabble.com/NLS-Singular-Gradient-Error-tp20

  1   2   >