Re: [R] Install local package

2009-06-11 Thread Ronggui Huang
## Check the package R CMD check path.of.package ## Build the package R CMD build pathof.package ## INSTALL the package R CMD INSTALL path.of.package You can use _R --help _ (from within terminal) to get more information. Ronggui 2009/6/11 Jorge Cornejo cornejo...@gmail.com: Hi, I'm

Re: [R] How to order an data.table by values of an column?

2009-06-11 Thread Allan Engelhardt
See help(order) and help([.data.frame). df - data.frame(Categ=c(468,351,0,234,117),Perc=c(31.52,27.52,0.77,22.55,15.99)) df[order(df$Categ),] # Categ Perc # 3 0 0.77 # 5 117 15.99 # 4 234 22.55 # 2 351 27.52 # 1 468 31.52 Lesandro wrote: Hello! Can you help me? How to

[R] install local package

2009-06-11 Thread Jorge Cornejo
Hi, I'm working on a package that I would someday put in CRAN. Now I want to test it on my computer. I already check and compile the files but I don't know how to install the package located on my hard drive. I'm running R under linux. Can anyone tell my how to do it? Thanks in advance.

[R] [R-pkgs] package installation fails (RandomFields)

2009-06-11 Thread Drew Hoysak
I have been unable to install the package RandomFields. I am using R 2.9.0-4 on Ubuntu 9.04. To install, I use the command: sudo R CMD INSTALL RandomFields_1.3.37.tar.gz The output follows below. Any help Would be appreciated. D. Hoysak Brandon University * Installing to library

Re: [R] [R-pkgs] package installation fails (RandomFields)

2009-06-11 Thread Martin Maechler
[[ NOTE: This accidentally was approved to go to R-packages, it should never have gone there, and I have deleted it from the archives. Please *only* reply to R-help (and the OP)! ]] DH == Drew Hoysak hoy...@wcgwave.ca on Wed, 10 Jun 2009 14:40:32 -0500 writes:

[R] Variogram fitted by Cauchy

2009-06-11 Thread damien landais
Hi I'm using R(2.9.0) and gstat package under Windows to plot sample variograms. When I want to fit them, I don't have the possibility to choose Cauchy functions. Under Mathematica for example, we have it and it seems to be the best one to fit the variograms I have I tested the others

Re: [R] Integrate function in R

2009-06-11 Thread Paul Hiemstra
?integrate, it is in the documentation Bhargab Chattopadhyay wrote: Hi! Can anyone please let me know what numerical integration procedure does the integrate function in package stats follow? Thank you in advance Shant [[alternative HTML version deleted]]

Re: [R] Splicing factors without losing levels

2009-06-11 Thread Peter Dalgaard
Titus von der Malsburg wrote: On Tue, Jun 09, 2009 at 11:23:36AM +0200, ONKELINX, Thierry wrote: For factors, you better convert them first back to character strings. splice - function(x, y) { x - levels(x)[x] y - levels(y)[y] factor(as.vector(rbind(x, y))) }

[R] ctc package

2009-06-11 Thread Penner, Johannes
Dear R-helpers, I would like to export hierarchical clusters e.g. fit - hclust(d, method=ward) in the newick format write(hc2Newick(fit),file='hclust.newick') Searching for a possibility I found this solution in the package ctc (http://www.bioconductor.org/packages/bioc/html/ctc.html).

[R] Issues getting R to write image files

2009-06-11 Thread Kenny Larsen
Hi All, Have spent the last couple of days learning R and shell scripting to do batch plotting jobs. I have had success getting R to complete a filled contour plot and output to a file (.jpg or .tiff etc). However, when I try to do the same thing with the simple plot command the script seems to

Re: [R] Issues getting R to write image files

2009-06-11 Thread Mario Valle
Has tried to close the image file at the end? Do: dev.off() Hope it helps mario Kenny Larsen wrote: Hi All, Have spent the last couple of days learning R and shell scripting to do batch plotting jobs. I have had success getting R to complete a filled contour plot

Re: [R] Predict GARCH

2009-06-11 Thread marlene marchena
So christofer proved (carry on the same procedure infinite times) that the forecast of the variance converge to the long run variance when a+b1 E(Sigma[t+2]^2) = w/(1-a-b) + [(a+b)^t]* Sigma[t+1]^2 Therefore when you predict n.ahead = 20 it must to converge to the long run variance. It can be

Re: [R] Issues getting R to write image files

2009-06-11 Thread Tobias Verbeke
Hi Kenny, Have spent the last couple of days learning R and shell scripting to do batch plotting jobs. I have had success getting R to complete a filled contour plot and output to a file (.jpg or .tiff etc). However, when I try to do the same thing with the simple plot command the script seems

[R] Help on drawing stars and radars in R (update)

2009-06-11 Thread Caroline Gideon-Adeniyi
Hi I don't know if you can help. I am a 2nd year Bsc Cosmetic Science student and in R I need some help in drawing stars. The problem that I have is I want to recreate a radar diagram similar to the one in excel. I have put in these commands in a script window: stars(shampoo1[, 1:6],

Re: [R] Issues getting R to write image files

2009-06-11 Thread Kenny Larsen
Thanks all, I added the dev.off() and although it didn't solve it it no doubt tidies things up on closing. I have got it working now, it is something in the plot() line, as removing all teh options solves it. I will work through adding them in one by one! Kenny Mario Valle wrote: Has

Re: [R] ctc package

2009-06-11 Thread Allan Engelhardt
The web page recommends installing using biocLite() so that is probably what you should do, but see also help(setRepositories) which seems to allow you to pick up (a version of) the package using the normal install.packages() method if you are somehow adverse to follow the recommended

Re: [R] Issues getting R to write image files

2009-06-11 Thread Ted Harding
On 11-Jun-09 09:24:42, Tobias Verbeke wrote: Hi Kenny, Have spent the last couple of days learning R and shell scripting to do batch plotting jobs. I have had success getting R to complete a filled contour plot and output to a file (.jpg or .tiff etc). However, when I try to do the same

Re: [R] Help on drawing stars and radars in R (update)

2009-06-11 Thread Barry Rowlingson
On Thu, Jun 11, 2009 at 10:01 AM, Caroline Gideon-Adeniyic.gideon-adeni...@fashion.arts.ac.uk wrote: Hi I don't know if you can help. I am a 2nd year Bsc Cosmetic Science student and in R I need some help in drawing stars. The problem that I have is I want to recreate a radar diagram

Re: [R] Issues getting R to write image files

2009-06-11 Thread Kenny Larsen
Hi all, Silly missing ) at the end of the plot command! is working now, just need to remove the V1 and V2 that appear under my axis labels! Cheers for all your help guys, much appreciated. Kenny Ted.Harding-2 wrote: On 11-Jun-09 09:24:42, Tobias Verbeke wrote: Hi Kenny, Have spent

[R] R Courses in Toronto

2009-06-11 Thread Leo Guelman
Dear R users, Does anybody know if there any good R courses within the Toronto area? 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

Re: [R] [R-pkgs] package installation fails (RandomFields)

2009-06-11 Thread Dirk Eddelbuettel
Drew, Wrong list -- please use r-help. Re-directing from r-packages. On 10 June 2009 at 14:40, Drew Hoysak wrote: | I have been unable to install the package RandomFields. I am using R | 2.9.0-4 on Ubuntu 9.04. | | To install, I use the command: | sudo R CMD INSTALL RandomFields_1.3.37.tar.gz

Re: [R] Issues getting R to write image files

2009-06-11 Thread Prof Brian Ripley
q() does call the internal version of graphics.off() which closes all open graphics devices. On Thu, 11 Jun 2009, Mario Valle wrote: Has tried to close the image file at the end? Do: dev.off() Hope it helps mario Kenny Larsen wrote: Hi All, Have spent the last

Re: [R] R Courses in Toronto

2009-06-11 Thread John Fox
Dear Leo, The York University Statistical Consulting Service often teaches R-related courses. For past examples, see http://www.yorku.ca/isr/scs/links.html and http://www.yorku.ca/isr/spida2009/index.html. I hope this helps, John On Thu, 11 Jun 2009 06:15:44 -0400 Leo Guelman

[R] Error in 1:p : NA/NaN argument when running model comparisons

2009-06-11 Thread Lindsay Banin
Hi there, I am trying to compare nonlinear least squares regression with AIC and anova. The simplest model is one nonlinear curve, and in the more complex model I have a categorical variable (producing parameter estimates for four curves). Both models run fine, but when I try to produce an AIC

[R] triangular plot

2009-06-11 Thread Penner, Johannes
Sorry for probably again an easy question but I can not find the solution... Using the ade4 package I am drawing a triangular graph: triangle.plot(data2, label = row.names(data2), clab=0.6, show.position=FALSE, box=FALSE) Which is what I want. Unfortunately the labels have a frame and a white

Re: [R] ctc package

2009-06-11 Thread Penner, Johannes
Dear Allan, Thank you very much! Sometimes the forest is difficult to see when you are looking at the trees only... as we would say... With kind regards Johannes __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] ctc package

2009-06-11 Thread Martin Morgan
Hi Johannes -- Penner, Johannes wrote: Dear R-helpers, I would like to export hierarchical clusters e.g. fit - hclust(d, method=ward) in the newick format write(hc2Newick(fit),file='hclust.newick') Searching for a possibility I found this solution in the package ctc

Re: [R] triangular plot

2009-06-11 Thread David Winsemius
On Jun 11, 2009, at 8:56 AM, Penner, Johannes wrote: Sorry for probably again an easy question but I can not find the solution... Using the ade4 package I am drawing a triangular graph: triangle.plot(data2, label = row.names(data2), clab=0.6, show.position=FALSE, box=FALSE) Which is what I

[R] problem with the legend when having two plots

2009-06-11 Thread kayj
I am trying to plot survival curves and here is the code plot(survfit(Surv(days,status)~group, data=g3), lty=1:2, mark.time=F, ylab=Probability, xlab=Suvival Time in Month) legend(10, 0.2,legend=c(Control,RIT), lty=c(2,1), title=Hormonal Therapy, bty=n) I will get two survival plots with the

[R] GRASS raster data processing

2009-06-11 Thread Maayt
Hi, I just imported two raster maps into R using the SPGRASS6 package, one containing elevation data and the other containing an erosion index: Kar_inc -readRAST6(Incis_Kar, plugin=FALSE) Kar_dem - readRAST6(DEM_Kar, plugin=FALSE) I just wanted to make a xy plot of erosion parameter vs

[R] S4 Package with definition of method 'names'

2009-06-11 Thread Thomas Roth (geb. Kaliwe)
Dear List, Is it possible to build a package with 'names' method for a S4-Class? The following works if directly pasted into R: (a simple test class with 1 attribute that is returned by invoking 'names') #class definition setClass(test, representation = representation(name = character),

Re: [R] [R-pkgs] package installation fails (RandomFields)

2009-06-11 Thread William Dunlap
The offending lines don't look right to me: 38 typedef struct key_type; 261 typedef struct mpp_storage; 309 typedef struct cov_fct; Shouldn't they be 'typedef struct struct_name typedefed_name'? Later in the file there are proper typedef's for these things. Bill Dunlap TIBCO

Re: [R] problem with the legend when having two plots

2009-06-11 Thread David Winsemius
On Jun 11, 2009, at 9:23 AM, kayj wrote: I am trying to plot survival curves and here is the code plot(survfit(Surv(days,status)~group, data=g3), lty=1:2, mark.time=F, ylab=Probability, xlab=Suvival Time in Month) legend(10, 0.2,legend=c(Control,RIT), lty=c(2,1), title=Hormonal Therapy,

[R] Cluster analysis, defining center seeds or number of clusters

2009-06-11 Thread amvds
I use kmeans to classify spectral events in high and low 1/3 octave bands: #Do cluster analysis CyclA-data.frame(LlowA,LhghA) CntrA-matrix(c(0.9,0.8,0.8,0.75,0.65,0.65), nrow = 3, ncol=2, byrow=TRUE) ClstA-kmeans(CyclA,centers=CntrA,nstart=50,algorithm=MacQueen) This works well when the actual

Re: [R] GRASS raster data processing

2009-06-11 Thread Nikos Alexandris
Maayt: I just imported two raster maps into R using the SPGRASS6 package, one containing elevation data and the other containing an erosion index: Kar_inc -readRAST6(Incis_Kar, plugin=FALSE) Kar_dem - readRAST6(DEM_Kar, plugin=FALSE) I just wanted to make a xy plot of erosion parameter vs

Re: [R] Install local package

2009-06-11 Thread Uwe Ligges
Ronggui Huang wrote: ## Check the package R CMD check path.of.package ## Build the package R CMD build pathof.package ## INSTALL the package R CMD INSTALL path.of.package It is recommended to build the tar.gz first and then isntall and check from the tarball rather than from the

Re: [R] [R-pkgs] package installation fails (RandomFields)

2009-06-11 Thread Uwe Ligges
William Dunlap wrote: The offending lines don't look right to me: 38 typedef struct key_type; 261 typedef struct mpp_storage; 309 typedef struct cov_fct; Shouldn't they be 'typedef struct struct_name typedefed_name'? Later in the file there are proper typedef's for these things.

Re: [R] Error in 1:p : NA/NaN argument when running model comparisons

2009-06-11 Thread Uwe Ligges
Lindsay Banin wrote: Hi there, I am trying to compare nonlinear least squares regression with AIC and anova. The simplest model is one nonlinear curve, and in the more complex model I have a categorical variable (producing parameter estimates for four curves). Both models run fine, but when

Re: [R] Help on drawing stars and radars in R (update)

2009-06-11 Thread Uwe Ligges
Barry Rowlingson wrote: On Thu, Jun 11, 2009 at 10:01 AM, Caroline Gideon-Adeniyic.gideon-adeni...@fashion.arts.ac.uk wrote: Hi I don't know if you can help. I am a 2nd year Bsc Cosmetic Science student and in R I need some help in drawing stars. The problem that I have is I want to

[R] [Ann] RMate, a bundle for TextMate and E-Texteditor

2009-06-11 Thread Hans-Peter Suter
I have uploaded RMate to Github. From the readme: RMate is a [TextMate](http://macromates.com/) bundle for [R](http://www.r-project.org/about.html). It is based on the [R/R Console/Rdaemon](http://svn.textmate.org/trunk/Bundles) bundles and is focused on: - easy to use, clear interface/menu -

[R] Syntax question: assigning sparse matrix elements

2009-06-11 Thread Dan Ruderman
Hopefully this is straightfoward. I have an matrix which is mostly zeroes. I want to assign it some non-zero elements whose rows, columns, and values I know. As a simple example, say I create a 3x2 matrix of zeros: m - matrix(rep(0,6),nrow=3) Now say I want to make the [1,1] and [3,2]

Re: [R] Cluster analysis, defining center seeds or number of clusters

2009-06-11 Thread Christian Hennig
Dear Alex, actually fixing the number of clusters in kmeans end then ending up with a smaller number because of empty clusters is not a standard method of estimating the number of clusters. I may happen (as apparently in some of your examples), but it is generally rather unusual. In most

[R] need help with strsplit function

2009-06-11 Thread njhuang86
Hi, if I have this string: a.b.c.d and I use this function: unlist(strsplit(a.b.c.d, \\.)), I get this as my output: a, b, c, and d. Is there a way to just split on the first period so I obtain only two pieces like: a and b.c.d? Anyways, thanks in advance! -- View this message in context:

[R] deSolve question

2009-06-11 Thread insun nam
Dear All, I like to simulate a physiologically based pharmacokinetics model using R but am having a problem with the daspk routine. The same problem has been implemented in Berkeley madonna and Winbugs so that I know that it is working. However, with daspk it is not, and the numbers are

Re: [R] [R-pkgs] package installation fails (RandomFields) - SOLVED

2009-06-11 Thread Drew Hoysak
Thanks to all who replied so quickly. Installing liblapack-dev solved the problem and I can now install RandomFields. Drew Hoysak Brandon University __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] How to force R to print 2 decimal places in column of a data.frame?

2009-06-11 Thread Lesandro
How to force R to print 2 decimal places in column of a data.frame? I tried to do so: x = inp(format(rounf(inp$Tamanho, 2), nsmall = 2),) where INP is data.frame and Size is the name of column. But has error: Error in eval.with.vis(expr, envir, enclos) : could not find function inp

Re: [R] need help with strsplit function

2009-06-11 Thread Gabor Grothendieck
Using strapply in gsubfn we can match by contents rather than delimiter. Parentheses in the regular expression surround captured portions. The first such captured portion is any string not containing a dot. We then follow that by matching a dot and a second captured expression which is

Re: [R] need help with strsplit function

2009-06-11 Thread Marc Schwartz
On Jun 11, 2009, at 10:44 AM, njhuang86 wrote: Hi, if I have this string: a.b.c.d and I use this function: unlist(strsplit(a.b.c.d, \\.)), I get this as my output: a, b, c, and d. Is there a way to just split on the first period so I obtain only two pieces like: a and b.c.d? Anyways,

[R] Expand a contingency table based on the value in one column

2009-06-11 Thread Mark Na
Hi R-helpers, I have the following (dummy) dataframe: test DATE LOCATION KIND CLASS COUNT 111 CAR A 2 211 TRUCK D 3 311 BUS E 4 412 CAR E 2 512 TRUCK A 7 612 BUS F

[R] saving loess fit

2009-06-11 Thread Lana Schaffer
Hi, pv.lo - loess(Affy ~ DABG, DA, span=0.2, degree=2, family=symmetric) I would like to know how to save the output from the loess fit so that I can read it again into another session of R. Can someone help me figure this out? Lana Schaffer Biostatistics/Informatics The Scripps Research

[R] difficulty in Installing

2009-06-11 Thread Alon Ben-Ari
Hello, I have openSUSE 11.1 Trying to install randomForest as SU after invoking R install.packages(randomForest) and I get this * Installing *source* package ‘randomForest’ ... ** libs gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c classTree.c -o classTree.o gcc

Re: [R] Expand a contingency table based on the value in one column

2009-06-11 Thread David Winsemius
On Jun 11, 2009, at 1:13 PM, Mark Na wrote: Hi R-helpers, I have the following (dummy) dataframe: test DATE LOCATION KIND CLASS COUNT 111 CAR A 2 211 TRUCK D 3 311 BUS E 4 412 CAR E 2 512

Re: [R] Syntax question: assigning sparse matrix elements

2009-06-11 Thread Duncan Murdoch
On 6/11/2009 12:34 PM, Dan Ruderman wrote: Hopefully this is straightfoward. I have an matrix which is mostly zeroes. I want to assign it some non-zero elements whose rows, columns, and values I know. As a simple example, say I create a 3x2 matrix of zeros: m - matrix(rep(0,6),nrow=3) Now

[R] Restrict AIC comparison to succesful models?

2009-06-11 Thread Manuel Morales
Hello list, I'm doing a bootstrap analysis where some models occasionally fail to converge. I'd like to automate the process of restricting AIC to the models that do converge. A contrived example of what I'd like to do is below: resp - c(1,1,2) pred - c(1,2,3) m1 - lm(resp~pred) m2 -

[R] gfortran command not found?

2009-06-11 Thread Alon Ben-Ari
Hello, I have openSUSE 11.1 Trying to install randomForest as SU after invoking R install.packages(randomForest) and I get this * Installing *source* package ‘randomForest’ ... ** libs gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c classTree.c -o classTree.o gcc

Re: [R] Expand a contingency table based on the value in one column

2009-06-11 Thread Marc Schwartz
On Jun 11, 2009, at 12:13 PM, Mark Na wrote: Hi R-helpers, I have the following (dummy) dataframe: test DATE LOCATION KIND CLASS COUNT 111 CAR A 2 211 TRUCK D 3 311 BUS E 4 412 CAR E 2 512

Re: [R] Installing the Rstem package

2009-06-11 Thread Rajan, Ravi
Hi, I can't find the package for LSA. When I try http://www.statistik.uni-dortmund.de/~ligges/Rstem_0.3-1.zip http://www.statistik.uni-dortmund.de/%7Eligges/Rstem_0.3-1.zip It says file not found. Is there an updated link? Ravi

Re: [R] saving loess fit

2009-06-11 Thread Henrik Bengtsson
See save() and load(), but the following might be easier because it does not mess with your existing object names: library(R.utils) saveObject(pv.lo, myLoessFit.Rbin) pv.lo - loadObject(myLoessFit.Rbin) foo - loadObject(myLoessFit.Rbin) print(identical(pv.lo, foo)) # = TRUE /Henrik On Thu,

Re: [R] Installing the Rstem package

2009-06-11 Thread Henrik Bengtsson
Google Rstem package - first hit. It is hosted by the Omegahat project. /H On Thu, Jun 11, 2009 at 10:29 AM, Rajan, Ravira...@rand.org wrote: Hi, I can't find the package for LSA. When I try http://www.statistik.uni-dortmund.de/~ligges/Rstem_0.3-1.zip

Re: [R] Installing the Rstem package

2009-06-11 Thread Marc Schwartz
Yep...except it looks like the package has not been submitted to CRAN for some time, which would facilitate the building of a Windows binary. From a check of the list archives, it looks like Uwe's link was a temporary solution. Prof Ripley appears to be building a binary of the package and

Re: [R] gfortran command not found?

2009-06-11 Thread Marc Schwartz
On Jun 11, 2009, at 12:34 PM, Alon Ben-Ari wrote: Hello, I have openSUSE 11.1 Trying to install randomForest as SU after invoking R install.packages(randomForest) and I get this * Installing *source* package ‘randomForest’ ... ** libs gcc -std=gnu99 -I/usr/lib/R/include

Re: [R] How to force R to print 2 decimal places in column of a data.frame?

2009-06-11 Thread Marc Schwartz
On Jun 11, 2009, at 11:48 AM, Lesandro wrote: How to force R to print 2 decimal places in column of a data.frame? I tried to do so: x = inp(format(rounf(inp$Tamanho, 2), nsmall = 2),) where INP is data.frame and Size is the name of column. But has error: Error in eval.with.vis(expr,

[R] Matrix manipulation

2009-06-11 Thread Payam Minoofar
Hello everyone, I have a couple of fairly simple questions (I hope) the answers to which I cannot find through the documentation at the moment. 1. I would like to delete the a row from a matrix if a certain elimination criterion is met. I am familiar with x - x[-7,] (to remove row 7, for

Re: [R] Installing the Rstem package

2009-06-11 Thread Prof Brian Ripley
On Thu, 11 Jun 2009, Marc Schwartz wrote: Yep...except it looks like the package has not been submitted to CRAN for some time, which would facilitate the building of a Windows binary. From a check of the list archives, it looks like Uwe's link was a temporary solution. It is perhaps worth

Re: [R] Re strict AIC comparison to succesful models?

2009-06-11 Thread Ben Bolker
Manuel Morales wrote: Hello list, I'm doing a bootstrap analysis where some models occasionally fail to converge. I'd like to automate the process of restricting AIC to the models that do converge. A contrived example of what I'd like to do is below: resp - c(1,1,2) pred - c(1,2,3)

[R] Count observation

2009-06-11 Thread MarcioRibeiro
Hi listers, I have the following code... data-as.matrix(c(1,2,3,4,5,6,7,8,9,10),nrow=10,ncol=1,byrow=TRUE) n-nrow(data) m-n-1 boot-data[sample(m,replace=T),] So, I need to count the number of times each observation was selected at the sample with replacement... Suppose I sampled... 4 5 1 3 7 5

[R] standard error beta glm

2009-06-11 Thread Ricardo Arias Brito
Dear All, The std. error of the estimated coefficients obtained by the summary.lm function can be calculated as: y=rnorm(20) x=y+rnorm(20) fit - lm(y ~ x) summary(fit) sqrt( sum(fit$resid**2)/fit$df.resid * solve(t(model.matrix(fit))%*%model.matrix(fit)) ) Is posible calculate Std. Error

Re: [R] Count observation

2009-06-11 Thread milton ruser
Hi Marcio, data.frame(table(boot)) ? milton brazil=toronto On Thu, Jun 11, 2009 at 3:13 PM, MarcioRibeiro mes...@pop.com.br wrote: Hi listers, I have the following code... data-as.matrix(c(1,2,3,4,5,6,7,8,9,10),nrow=10,ncol=1,byrow=TRUE) n-nrow(data) m-n-1

[R] formula for degrees of freedom for nonlinear mixed model in nlme

2009-06-11 Thread J S
Dear forum members, What is the formula to calculate denominator degrees of freedom (den df) for nonlinear mixed-effect models with covariates? My model is similar to a CO2 uptake example from Pinheiro and Bates (2000, page 376). In this CO2 dataset, there are two treatments and two types

Re: [R] Count observation

2009-06-11 Thread Jorge Ivan Velez
Dear Marcio, Here is one way. Please notice that even thought I changed the name of your data as well as its structure, you can easily modify it to your needs. # Data somedata - 1:10 n-length(somedata) m-n-1 # 1 sample boot - somedata[ sample(m,replace=T) ] table(factor( boot, levels=1:10 ) ) #

Re: [R] Re strict AIC comparison to succesful models?

2009-06-11 Thread Manuel Morales
On Thu, 2009-06-11 at 12:08 -0700, Ben Bolker wrote: Manuel Morales wrote: Hello list, I'm doing a bootstrap analysis where some models occasionally fail to converge. I'd like to automate the process of restricting AIC to the models that do converge. A contrived example of what

Re: [R] How to force R to print 2 decimal places in column of a data.frame?

2009-06-11 Thread Lesandro
Hi Marc Schwartz, Your suggestion solved my problem. Thanks you. --- Em qui, 11/6/09, Marc Schwartz marc_schwa...@me.com escreveu: De: Marc Schwartz marc_schwa...@me.com Assunto: Re: [R] How to force R to print 2 decimal places in column of a data.frame? Para: Lesandro

Re: [R] Re strict AIC comparison to succesful models?

2009-06-11 Thread Ben Bolker
Manuel Morales wrote: On Thu, 2009-06-11 at 12:08 -0700, Ben Bolker wrote: Manuel Morales wrote: Hello list, I'm doing a bootstrap analysis where some models occasionally fail to converge. I'd like to automate the process of restricting AIC to the models that do converge. A contrived

Re: [R] formula for degrees of freedom for nonlinear mixed model in nlme

2009-06-11 Thread David Winsemius
The FAQ 7.35 links to this posting: https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html On Jun 11, 2009, at 3:57 PM, J S wrote: Dear forum members, What is the formula to calculate denominator degrees of freedom (den df) for nonlinear mixed-effect models with covariates? My model

[R] color in grouped lattice xyplot plot

2009-06-11 Thread Katharina May
Hi, I've got a data.frame object which I would like to plot in a lattice xyplot grouped by a variable and using a value for the color of each point which is stored in a variable in the same data.frame. I tried the following code: my.panel.xy - function(x, y, ...){ panel.xyplot(x, y, ...)

[R] Automatically placing legend in location of most whitespace.

2009-06-11 Thread Jason Rupert
Just read the following: https://stat.ethz.ch/pipermail/r-help/2003-October/039940.html Is the labcurve function, really the putKey function, in the Hmisc package the best way the to go about automatically placing legend in location of most whitespace? Thanks for any insights.

Re: [R] Matrix manipulation

2009-06-11 Thread Henrique Dallazuanna
Try this: For the first and the second question: transform(subset(d, row.names(d) != 2), row.names=NULL) On Thu, Jun 11, 2009 at 3:53 PM, Payam Minoofar payam.minoo...@meissner.com wrote: Hello everyone, I have a couple of fairly simple questions (I hope) the answers to which I cannot

Re: [R] Matrix manipulation

2009-06-11 Thread David Winsemius
On Jun 11, 2009, at 2:53 PM, Payam Minoofar wrote: Hello everyone, I have a couple of fairly simple questions (I hope) the answers to which I cannot find through the documentation at the moment. 1. I would like to delete the a row from a matrix if a certain elimination criterion is

Re: [R] Re strict AIC comparison to succesful models?

2009-06-11 Thread Manuel Morales
On Thu, 2009-06-11 at 16:10 -0400, Ben Bolker wrote: Manuel Morales wrote: On Thu, 2009-06-11 at 12:08 -0700, Ben Bolker wrote: Manuel Morales wrote: Hello list, I'm doing a bootstrap analysis where some models occasionally fail to converge. I'd like to automate the process of

Re: [R] How to extract from a matrix based on indices in a vector?

2009-06-11 Thread Logickle
Thanks, guys. I'll take at a look at these solutions. BTW, my apologies, by A,B,C,D,... I meant just some real number, not characters A,B,..., but I wasn't clear about that. If that effects the solution approach please let me know, but I don't think it does. Thanks again, Doug Marc Schwartz-3

[R] Optimization Question

2009-06-11 Thread Brecknock, Peter
Hi All Apologies if this is not the correct list for this question. The Rglpk package offers the following example in its documentation library(Rglpk) ## Simple mixed integer linear program. ## maximize: 3 x_1 + 1 x_2 + 3 x_3 ## subject to: -1 x_1 + 2 x_2 + x_3 = 4 ## 4 x_2 - 3 x_3 = 2 ##

[R] TCLTK Times out Leopard.

2009-06-11 Thread INBEL
I'm trying to get the Tcltk package loaded on R 2.9 (I think, it's just recently updated). At first it was looking for X11 files in the wrong library so created an alias to point it in the right direction. Now when I load it nothing happens, the program stops responding. Any ideas? I should point

Re: [R] Matrix manipulation

2009-06-11 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius Sent: Thursday, June 11, 2009 1:49 PM To: Payam Minoofar Cc: r-help@r-project.org Subject: Re: [R] Matrix manipulation On Jun 11, 2009, at 2:53 PM, Payam

Re: [R] Inf in nnet final value for validation data

2009-06-11 Thread jude.ryan
Andrea, You can calculate predictions for your validation data based on nnet objects using the predict function (the predict function can also be used for regressions, quantile regressions, etc.) If you create a neural net with the following code: library(nnet) # 3 hidden neurons, for

[R] Tables without names

2009-06-11 Thread Stavros Macrakis
A table without names displays like a vector: unname(table(2:3)) [1] 1 1 1 and preserves the table class (as with unname in general): dput(unname(table(2:3))) structure(c(1L, 1L), .Dim = 2L, class = table) Does that make sense? R is not consistent in its treatment of such

[R] help installing Rmpi

2009-06-11 Thread ALAN SMITH
Hello R users and developers, I would like to install Rmpi so that I may take advantage of all of the CPUs in my computer, but I cannot get it to install and I am not very good with linux so it is adding to the headache. I have looked through the help archive, but I have not been successful at

Re: [R] Matrix manipulation

2009-06-11 Thread Gabor Grothendieck
Or perhaps: M10[rowSums(M10 == 63) == 0, ] On Thu, Jun 11, 2009 at 4:49 PM, David Winsemiusdwinsem...@comcast.net wrote: On Jun 11, 2009, at 2:53 PM, Payam Minoofar wrote: Hello everyone, I have a couple of fairly simple questions (I hope) the answers to which I cannot find through the

[R] Postcript font size

2009-06-11 Thread Andre Nathan
Hello I'm doing a number of plots and in all of them I'm specifying the same font size. However, comparing one plot to the other, they have fonts of different sizes, so it appears some scaling is being done. I tried using both postcript(pointsize = ...) and par(ps = ...), but the results were

Re: [R] Postcript font size

2009-06-11 Thread Andre Nathan
On Thu, 2009-06-11 at 19:09 -0300, Andre Nathan wrote: Is there a way to specify a font size that is consistent among calls to plot()? To put it correctly: is there a way to specify a font size that is consistent among calls to postcript()? All the fonts in the same file have the same size,

Re: [R] Postcript font size

2009-06-11 Thread Ted Harding
On 11-Jun-09 22:16:22, Andre Nathan wrote: On Thu, 2009-06-11 at 19:09 -0300, Andre Nathan wrote: Is there a way to specify a font size that is consistent among calls to plot()? To put it correctly: is there a way to specify a font size that is consistent among calls to postcript()? All

Re: [R] Count observation

2009-06-11 Thread MarcioRibeiro
Hey... Milton... Is that a equation... Brazil=Toronto If so, mine is... Brazil=Montreal You got it... I am not having a good time with R... There is no help for data manipulation at all... Thanks for the help... Marcio milton ruser wrote: Hi Marcio, data.frame(table(boot)) ? milton

Re: [R] Count observation

2009-06-11 Thread Henrique Dallazuanna
Try this also: cbind(data, tabulate(boot, nbins=nrow(data))) On Thu, Jun 11, 2009 at 4:13 PM, MarcioRibeiro mes...@pop.com.br wrote: Hi listers, I have the following code... data-as.matrix(c(1,2,3,4,5,6,7,8,9,10),nrow=10,ncol=1,byrow=TRUE) n-nrow(data) m-n-1

Re: [R] Postcript font size

2009-06-11 Thread Andre Nathan
On Thu, 2009-06-11 at 23:48 +0100, ted.hard...@manchester.ac.uk wrote: How are you comparing? A: Looking into the PostScript code in the files, and identifying the font-sizes where they are set in the code? This. To get the size I wanted in both files, I had to use par(ps = 15) in one of

[R] More basic question

2009-06-11 Thread Payam Minoofar
I have encountered a more fundamental problem in my data set. I'm using read.csv, and all the data are imported as character. How do I do a string comparison in a line like this: M10[ !sapply(1:10, function(x)666 %in% M10[x,]), ] Alternately, how do I change the class type on a column in a

[R] More basic question

2009-06-11 Thread Payam Minoofar
Never mind the query regarding setting attributes. I just found the relevant section in the manual. The only remaining question is regarding doing string comparisons in sapply argument below. Thank you. Payam I have encountered a more fundamental problem in my data set. I'm using read.csv,

Re: [R] More basic question

2009-06-11 Thread milton ruser
Hi there, It may works: df$myvar-as.numeric(as.character(df$myvar)) bests milton brazil=toronto On Thu, Jun 11, 2009 at 7:37 PM, Payam Minoofar payam.minoo...@meissner.com wrote: I have encountered a more fundamental problem in my data set. I'm using read.csv, and all the data are imported

Re: [R] formula for degrees of freedom for nonlinear mixed model in nlme

2009-06-11 Thread Ben Bolker
David Winsemius wrote: The FAQ 7.35 links to this posting: https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html Actually, this is a different question from the usual why don't I get denominator df? question -- it is how are these calculated (since the poster is using nlme,

Re: [R] deSolve question

2009-06-11 Thread spencerg
Dear In-Sun: I have not seen a reply, so I will offer some suggestions, hoping I can help without understanding all the details. 1. Have you run that code with options(warn=2)? It produced over 50 warnings for me, and options(warn=2) will convert the warnings to errors,

Re: [R] Tables without names

2009-06-11 Thread David Winsemius
On Jun 11, 2009, at 5:35 PM, Stavros Macrakis wrote: A table without names displays like a vector: unname(table(2:3)) [1] 1 1 1 and preserves the table class (as with unname in general): dput(unname(table(2:3))) structure(c(1L, 1L), .Dim = 2L, class = table) Does that make sense?

Re: [R] formula for degrees of freedom for nonlinear mixed model in nlme

2009-06-11 Thread David Winsemius
On Jun 11, 2009, at 8:47 PM, Ben Bolker wrote: David Winsemius wrote: The FAQ 7.35 links to this posting: https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html Actually, this is a different question from the usual why don't I get denominator df? question -- it is how are these

  1   2   >