Re: [R] Replace / with - in date

2010-04-15 Thread arnaud Gaboury
Why don't you try something like : Xd$x=as.date(xd$x,format="%y/%m/%d"). > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Christian Raschke > Sent: Thursday, April 15, 2010 8:28 PM > To: r-help@r-project.org > Subject: Re:

Re: [R] Regression using R

2010-04-15 Thread Dieter Menne
Samuel Bravo wrote: > > > I'm working on a very large project in which we do many calculations which > include many types of regression such as, Liner, Quadratic, Cubic, > Exponential, Sinusoidal, and Logarithmic. > Students are often looking at the wrong place. It's not intuitive that quadr

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-15 Thread Prof Brian Ripley
Since the context is missing in this message, from others this is about 32-bit Windows. On Thu, 15 Apr 2010, yehengxin wrote: Thanks for your response. I found the folder to modify the compiler for C source codes. C++ 6.0 is an old C programming environment (1994~1998) but it is efficient.

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-15 Thread yehengxin
I am using 32-bit Window XP. -- View this message in context: http://n4.nabble.com/Efficiency-of-C-Compiler-in-R-CMD-SHLIB-tp1934429p1934486.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://st

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-15 Thread yehengxin
Thanks for your response. I found the folder to modify the compiler for C source codes. C++ 6.0 is an old C programming environment (1994~1998) but it is efficient. When compiling C source codes in C programming environment, one needs to choose between "debug" or "release" modes. "release" mo

Re: [R] hugene10stv1cdf

2010-04-15 Thread Martin Morgan
On 04/15/2010 08:43 PM, Christoph Knapp wrote: > Hi all, > I'm just tried to start analysing some micro-array chips. And R was > asking for this package. When I tried to install it it says that: > > Using R version 2.10.1, biocinstall version 2.5.10. > Installing Bioconductor version 2.5 packages:

Re: [R] tsp for xts or zoo object

2010-04-15 Thread Gabor Grothendieck
start, end, frequency and deltat functions have methods for both ts and zoo objects. Its not a good idea to tsp for ts objects since it involves mucking with internals. On Thu, Apr 15, 2010 at 11:51 PM, Erin Hodgess wrote: > Dear R People: > > Is there an equivalent for "tsp" for xts or zoo obje

[R] tsp for xts or zoo object

2010-04-15 Thread Erin Hodgess
Dear R People: Is there an equivalent for "tsp" for xts or zoo objects, please? thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com __ R-h

[R] hugene10stv1cdf

2010-04-15 Thread Christoph Knapp
Hi all, I'm just tried to start analysing some micro-array chips. And R was asking for this package. When I tried to install it it says that: Using R version 2.10.1, biocinstall version 2.5.10. Installing Bioconductor version 2.5 packages: [1] "hugene10stv1cdf" Please wait... Warning message: In

Re: [R] multidimensional integration in R?

2010-04-15 Thread Ravi Varadhan
There are some exciting new options available now in R for multidimensional integration also known as cubature. There is the "cubature" package, which is an R-port by Bala Narasimhan of the C code by Steve Johnson on adaptive multidimensional integration. This is very similar to "adapt" whic

Re: [R] Problems getting symbols() to show table data

2010-04-15 Thread Gabor Grothendieck
Try this: library(gplots) URL <- "http://n4.nabble.com/file/n1890724/test-data.txt"; DF <- read.table(URL) balloonplot(colnames(DF)[col(DF)], rownames(DF)[row(DF)], abs(as.matrix(DF)), dotcolor = c("lightblue", "red")[(c(matrix_data) < 0) + 1], show.margins = FALSE, cum.ma

[R] TeachingDemos install bumps out with 'Out of memory!'

2010-04-15 Thread Uwe Dippel
The same thing that happened to my 'maptools' (http://permalink.gmane.org/gmane.comp.lang.r.general/177404) also hits me here: It eats all memory until the system dies. Alas, in this case, no Ubuntu package. Since I installed some tens of packages with the same method in the meantime, I guess som

Re: [R] Consistent behaviour of for-loop [Solved]

2010-04-15 Thread Uwe Dippel
Greg Snow wrote: The first thing to do is look at the help page for the function: ?qqnorm and ?qqmath, the package where these functions are defined is at the top of the page, if that package is graphics then it is a base graphics function, if the package is grid, lattice, or ggplot2 then it is gr

Re: [R] error

2010-04-15 Thread jim holtman
It probably means that t1 had NAs. look at the content of t1 at the point of the error. You might want to test to see if there is an NA in t1 before the test. 2010/4/15 > hi, > > i have a simulation code for some two sample tests and in the middle of > the simulation, the code gave > > Error i

[R] error

2010-04-15 Thread firat . ozdemir
hi, i have a simulation code for some two sample tests and in the middle of the simulation, the code gave Error in if (t1[1] > 0 || t1[2] < 0) yhb = yhb + 1 : missing value where TRUE/FALSE needed what does it mean and how can it be solved.. fırat

Re: [R] Regression using R

2010-04-15 Thread Daniel Malter
I think this requires you to just pick up a manual / introductory book on R/regression in R, of which there are many on the internet / in the bookstores, respectively. Every manual I have seen has at least examples for quadratics. And extensions to other functional forms are straightforward. Danie

Re: [R] Replace / with - in date

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 7:20 PM, prem_R wrote: x <- c("2000/01/01", "2001 / 02 / 01 ","2000 / 03 / 01 ","2000 / 04 / 01 ","2000 / 05 /01","2000/06/01","2000/07/01","2000/08/01","2000/09/01","2000/10/01") xd <- as.data.frame(x) levels(xd$x) <- gsub("/", "-", levels(xd$x)) fix(xd

Re: [R] Replace / with - in date

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 7:20 PM, prem_R wrote: x <- c("2000/01/01", "2001 / 02 / 01 ","2000 / 03 / 01 ","2000 / 04 / 01 ","2000 / 05 /01","2000/06/01","2000/07/01","2000/08/01","2000/09/01","2000/10/01") xd <- as.data.frame(x) levels(xd$x) <- gsub("/", "-", levels(xd$x)) fix(xd

Re: [R] Does "sink" stand for anything?

2010-04-15 Thread Sharpie
Paul Miller wrote: > > Hello Everyone, >   > Learning about R and its wonderful array of functions. If it's not > obvious, I usually try to find out what a function stands for. I think > this helps me remember better. >   > One function that has me stumped is "sink." Can anyone tell me if this >

[R] factors as bwplot x axis

2010-04-15 Thread James Rome
Dear List, I am having problems getting my box and whisker plots to put boxes on the right x-axis values. x is the hour of the day from 0 to 23. > unique(mdf$OnHour) [1] 5 4 6 7 11 12 9 8 19 14 13 21 20 10 18 17 15 16 23 22 0 1 3 2 mdf$OnHFact = factor(mdf$OnHour, levels=seq(0,23), labe

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-15 Thread Sharpie
yehengxin wrote: > > Dear R experts: > > I attempted to compile c source code into DLL using "R CMD SHLIB" but I > found the DLL run in R is almost twice slower than the codes compiled in > C++ 6.0 when I chose "release" option and is as fast as the situation > where I chose "debug" option in

[R] Regression using R

2010-04-15 Thread Samuel Bravo
Hello, I'm working on a very large project in which we do many calculations which include many types of regression such as, Liner, Quadratic, Cubic, Exponential, Sinusoidal, and Logarithmic. Im well aware that its easy enough to do Linear regression in R but what about the other types? I've been s

[R] converting Ggobi csv input to xml for line plots in 3d

2010-04-15 Thread rtist
Hi, I was wondering if any Ggboi experts have encountered the following. I have data in csv that I want to plot with lines in ggobi. Unfortunately, there is some kind of information missing that xml seems to contain. I.e. I can plot scatterplots with dots using csv input, but not connect with l

Re: [R] how to work with big matrices and the ff-package?

2010-04-15 Thread Jens Oehlschlägel
Anne, > After the above step I need to convert my ff_matrix to a data.frame to > discretize the whole matrix and calculate the mutual information. > The calculated result should be saved as an ffdf-object or something similar. > disc <- as.ffdf(discretize(as.data.frame(as.ffdf(ffmat)), disc="

[R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-15 Thread yehengxin
Dear R experts: I attempted to compile c source code into DLL using "R CMD SHLIB" but I found the DLL run in R is almost twice slower than the codes compiled in C++ 6.0 when I chose "release" option and is as fast as the situation where I chose "debug" option in C++ 6.0. I wonder how to improve

Re: [R] Any chance R will ever get beyond the 2^31-1 vector size limit?

2010-04-15 Thread Thomas Lumley
There is one thing that would definitely break. Quite a bit of compiled code relies on the fact that the R integer type and the type used to index arrays and the C int type are the same. The C int type won't change, so if the type used to index arrays changes, the R integer type will be diff

Re: [R] Any chance R will ever get beyond the 2^31-1 vector size limit?

2010-04-15 Thread Matthew Keller
HI Duncan and R users, Duncan, thank you for taking the time to respond. I've had several other comments off the list, and I'd like to summarize what these have to say, although I won't give sources since I assume there was a reason why people chose not to respond to the whole list. The long and s

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Greg Snow
The first thing to do is look at the help page for the function: ?qqnorm and ?qqmath, the package where these functions are defined is at the top of the page, if that package is graphics then it is a base graphics function, if the package is grid, lattice, or ggplot2 then it is grid based graphi

Re: [R] Replace / with - in date

2010-04-15 Thread prem_R
> x <- c("2000/01/01", "2001/02/01","2000/03/01","2000/04/01","2000/05/01","2000/06/01","2000/07/01","2000/08/01","2000/09/01","2000/10/01") > xd <- as.data.frame(x) > levels(xd$x) <- gsub("/", "-", levels(xd$x)) > fix(xd) This works fine .but with one more variable say xsd in the data frame

Re: [R] Question about R mode

2010-04-15 Thread Greg Snow
The mode is a well defined concept for theoretical distributions, but much less well defined when applied to data. Some attempts at getting the mode of data actually returns a quirk of rounding rather than anything informative about the data and the distribution that it represents. This is esp

Re: [R] R package documentation

2010-04-15 Thread David Scott
Sébastien Bihorel wrote: Thanks David, After a bit of research, I believe that I've found the post you are referring to: http://tolstoy.newcastle.edu.au/R/e9/help/10/03/8779.html I will look into the proposed solutions. Sebastien Yes, that is the thread I was referring to. David _

Re: [R] Replace / with - in date

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 5:46 PM, David Winsemius wrote: It's going to work better if you offer a non-ambiguous version of your data. Use dump or dput. If you use the dump route, then see the Posting Guide example. If you use dput, then it is as simple as dput(object). Perhaps (if dfrm is the

Re: [R] Does "sink" stand for anything?

2010-04-15 Thread John Sorkin
Sink is meant to mean send output to the location I specify. It has no hidden meaning that I am aware of. John --Original Message-- From: Paul Miller To: r-help@r-project.org Subject: [R] Does "sink" stand for anything? Sent: Apr 15, 2010 5:12 PM Hello Everyone, Learning about R and it

Re: [R] Replace / with - in date

2010-04-15 Thread David Winsemius
It's going to work better if you offer a non-ambiguous version of your data. Use dump or dput. If you use the dump route, then see the Posting Guide example. If you use dput, then it is as simple as dput(object). Perhaps (if dfrm is the name of a dataframe): dput(head(dfrm)) On Apr 15, 2

Re: [R] filled.contour ON TOP of a base map

2010-04-15 Thread Ray Brownrigg
On Thu, 15 Apr 2010, Víctor Homar Santaner wrote: > Anyone? > The answer appears to be "no". Going back to your original question though, you could just not fill the map. I.e. filled.contour(x,y,z,levels=c(2,4,6,8,10),plot.axes=map("worldHires",add=T)) Otherwise, you may have to do things the '

Re: [R] multidimensional integration in R?

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 5:29 PM, Muhtar Osman wrote: Hello, I was wondering if there is a R function can be used for multidimensional integration. There used to be a package called "adapt", but it seems not available anymore. It's not on CRAN but you can find it in the archives. David Winsemi

Re: [R] Replace / with - in date

2010-04-15 Thread prem_R
This is my sample data 2000/01/01 2000/01/01 2000/02/01 2000/10/01 2000/19/01 2000/20/01 2000/21/01 2000/22/01 2000/23/01 2000/25/01 2000/26/01 2000/27/01 2000/28/01 2000/29/01 Tried using levels function but got the following error . Error in levels(a$date) <- gsub("/", "-", levels(a$date)) :

[R] multidimensional integration in R?

2010-04-15 Thread Muhtar Osman
Hello, I was wondering if there is a R function can be used for multidimensional integration. There used to be a package called "adapt", but it seems not available anymore. Thanks, -MJO __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Does "sink" stand for anything?

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 5:12 PM, Paul Miller wrote: Hello Everyone, Learning about R and its wonderful array of functions. If it's not obvious, I usually try to find out what a function stands for. I think this helps me remember better. One function that has me stumped is "sink." Can anyone

[R] Does "sink" stand for anything?

2010-04-15 Thread Paul Miller
Hello Everyone,   Learning about R and its wonderful array of functions. If it's not obvious, I usually try to find out what a function stands for. I think this helps me remember better.   One function that has me stumped is "sink." Can anyone tell me if this stands for something?   Thanks,   Pa

[R] [R-pkgs] vcdExtra 0.5-0 is released to CRAN

2010-04-15 Thread Michael Friendly
I'm pleased to announce the release of the vcdExtra package, v. 0.5-0 from R-Forge to CRAN, on its way to a CRAN server near you. vcdExtra was originally designed to serve as a sandbox for introducing extensions of mosaic plots and other visualizations for categorical data, particularly those

Re: [R] r-loop

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 4:24 PM, Changbin Du wrote: HI, Dear community, I am building the following loop, ww<-function(file) { lossw<-vector() for (x in seq(0.1, 0.9, by=0.1)) { cat('xweight ', x, '\n') lossw[i] <- cross.validation(file, x)$avg } return(los

Re: [R] r-loop

2010-04-15 Thread Changbin Du
Thanks so much, Marius! It works! On Thu, Apr 15, 2010 at 1:35 PM, Marius 't Hart wrote: > lossw[i] <- cross.validation(file, x)$avg > > change to: > > lossw <- append(lossw,cross.validation(file, x)$avg) > > > > > Changbin Du wrote: > >> HI, Dear community, >> >> I am building the following

Re: [R] Rserve : CStack usage too close to the limit

2010-04-15 Thread Bio7
I successfully use RServe with big matrices for e.g. image analysis and as a computational backend for my GUI. http://www.uni-bielefeld.de/biologie/Oekosystembiologie/bio7app/flashtut/rperspective.htm http://www.uni-bielefeld.de/biologie/Oekosystembiologie/bio7app/flashtut/rperspective.htm http

[R] r-loop

2010-04-15 Thread Changbin Du
HI, Dear community, I am building the following loop, ww<-function(file) { lossw<-vector() for (x in seq(0.1, 0.9, by=0.1)) { cat('xweight ', x, '\n') lossw[i] <- cross.validation(file, x)$avg } return(lossw) } MY question is how to index the lossw[

Re: [R] <<- how/when/why do you use it?

2010-04-15 Thread Greg Snow
Thanks Gabor, I had not thought of using environments like that. It looks like it can be done even simpler: fun3 <- function() { e <- environment() tmp <- matrix( nrow=0, ncol=2 ) fun4 <- function(x) { e$tmp <- rbind(e$tmp, x) (x[1] - 3)^

Re: [R] curve

2010-04-15 Thread Greg Snow
Or here is a way to plot against one of the variables while interactively changing the other one: library(TeachingDemos) myfun <- function(x,y) sin(x^2) * cos(y^2) myfun2 <- function(y) curve( myfun(x,y), from=-pi, to=pi, ylim=c(-1,1) ) tkexamp( myfun2, list( y=list('slider', from=-pi,

Re: [R] how to work with big matrices and the ff-package?

2010-04-15 Thread Jens Oehlschlägel
Anne,   > After the above step I need to convert my ff_matrix to a data.frame to > discretize the whole matrix and calculate the mutual information. > The calculated result should be saved as an ffdf-object or something similar. > disc <- as.ffdf(discretize(as.data.frame(as.ffdf(ffmat)), disc="

Re: [R] Replace / with - in date

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 2:28 PM, Christian Raschke wrote: Is there anything that speaks against just applying gsub to the factor levels if one would like to keep everything as factors (and not consider true Date classes or character vectors)? I.e: > x <- c("2000/01/01", "2001/02/01") > xd <- a

Re: [R] Replace / with - in date

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 2:22 PM, prem_R wrote: Thanks Mr.Winsemius for the proposed solution ,it worked fine.But when came to the entire data frame containing 40 rows ,i used the following code as proposed by you a$date1<-gsub("/","-",a$date) got the following error: Error in `$<-.data

Re: [R] Replace / with - in date

2010-04-15 Thread Christian Raschke
Is there anything that speaks against just applying gsub to the factor levels if one would like to keep everything as factors (and not consider true Date classes or character vectors)? I.e: > x <- c("2000/01/01", "2001/02/01") > xd <- as.data.frame(x) > levels(xd$x) <- gsub("/", "-", levels(xd$

[R] nested (hierarchical) anova

2010-04-15 Thread Héctor Villalobos
Hi, I'm having difficulty to replicate in R a nested (hierarchical) anova example found in p. 308 of Zar, J.H. 1996. Bostatistical Analysis. Prentice Hall. 3rd ed. The example (15.1) is as follows: The variable is blood cholesterol concentration in women (in mg/100 ml of plasma). This variable

Re: [R] Replace / with - in date

2010-04-15 Thread prem_R
Thanks Mr.Winsemius for the proposed solution ,it worked fine.But when came to the entire data frame containing 40 rows ,i used the following code as proposed by you a$date1<-gsub("/","-",a$date) got the following error: Error in `$<-.data.frame`(`*tmp*`, "date1", value = character(0)) :

Re: [R] Exporting an rgl graph

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 1:52 PM, Gavin Simpson wrote: On Thu, 2010-04-15 at 13:00 -0400, David Winsemius wrote: On Apr 15, 2010, at 12:34 PM, l...@stat.uiowa.edu wrote: The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1 ) has an editorial on including animations, 3D vis

Re: [R] Efficient algorithm to get a solution path for ridge regression?

2010-04-15 Thread Kenneth Lo
Thanks for your pointer. I looked into "Applied Regression Analysis" by Draper and Smith, and the ridge trace solution can be obtained efficiently by expressing it in canonical form. It could be coded without much difficulty, but I'm just wondering if there's any package which has already i

[R] data.frame and ddply

2010-04-15 Thread arnaud Gaboury
Dear group, I have this following data.frame: > c DESCRIPTION CREATED.DATE QUANITY CLOSING.PRICE 26 PRM HGH GD ALU 2010-04-09 -12,415.9000 27 PRM HGH GD ALU 2010-04-09 12,415.9000 28 PRIMARY NICKEL 2010-03-04 1 25,755.7100 29 PRIMARY NICKEL 2010-03-05

Re: [R] Unwanted boxes in legend

2010-04-15 Thread Peter Ehlers
On 2010-04-15 11:10, Steve Murray wrote: Dear all, I am using the following code to generate a legend in my plot (consisting of both bars and points), but end up with boxes around my points: legend(10, par("usr")[4], c("A", "B", "C", "D"), fill=c(NA,NA, "grey28", NA), pch=c(16,4,NA,18), col=

Re: [R] Replace / with - in date

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 1:51 PM, prem_R wrote: Hi,every one .I have searched the solutions in the forum for replacing my date value which is in a data frame ,01/01/2000 to 01-01-2000 using replace function but got the following warning message x<-"2000/01/01" xd<-as.data.frame(x) xd$x<-repl

Re: [R] Exporting an rgl graph

2010-04-15 Thread baptiste auguie
On 15 April 2010 18:34, wrote: > The current issue of JCGS (Vol 18 No 1, > http://pubs.amstat.org/toc/jcgs/19/1) has an editorial on including > animations, 3D visualizations, and movies in on-line PDF files > supporting JCGS articles. The online supplements to the editorial > include examples.  

Re: [R] histogram

2010-04-15 Thread Santosh
yes.. that now works! thank you so much, Paul & Peter!! -santosh On Thu, Apr 15, 2010 at 3:11 AM, Paul Hiemstra wrote: > Santosh wrote: > >> Thanks for your email... yes, I had tried that "bw" thing.. for some >> reason it does not seem to work.. could not figure out where I am wrong... >> >> Be

Re: [R] can't find "daphnia.txt" and others while working through Crawley's R-Book

2010-04-15 Thread David Hardie
Thanks again David. Looking again I now see the last line of the Acknowledgements which directs the reader to the author's website to get the datafiles. Of all the places I thought to look I had never considered reading the Acknowlegements! It seems to be that moving it about one line farthe

Re: [R] Exporting an rgl graph

2010-04-15 Thread Gavin Simpson
On Thu, 2010-04-15 at 13:00 -0400, David Winsemius wrote: > On Apr 15, 2010, at 12:34 PM, l...@stat.uiowa.edu wrote: > > > The current issue of JCGS (Vol 18 No 1, > > http://pubs.amstat.org/toc/jcgs/19/1 ) has an editorial on including > > animations, 3D visualizations, and movies in on-line PDF f

Re: [R] R CMD REMOVE etc. query

2010-04-15 Thread Prof. John C Nash
Brian Ripley pointed out that the library() documentation (third screen, however) says that library() and require() check current environment to see if a package is loaded and only load if it is not present. I may have oversimplified, and clarifications welcome. But this is clearly NOT what I wa

[R] Replace / with - in date

2010-04-15 Thread prem_R
Hi,every one .I have searched the solutions in the forum for replacing my date value which is in a data frame ,01/01/2000 to 01-01-2000 using replace function but got the following warning message x<-"2000/01/01" xd<-as.data.frame(x) xd$x<-replace(xd$x,xd$x=="/","-") Warning message: In `[<-.

[R] Rserve : CStack usage too close to the limit

2010-04-15 Thread Matthieu Decorde
Hi, I use the Rserve package (RserveEngine.jar) and the Java client (REngine.jar) from Rforge. I manipulate R matrices from within Java. When calling a R function from the Java client on a R matrix, Rserve gives an error : "CStack too close to the limit" That error happens when the matrix has a

[R] fixed portion of lme4 model in newdata

2010-04-15 Thread Jacob Wegelin
Suppose we have • An lmer{lme4} model, MyModel, computed on dataframe SomeDATA; • Dataframe NEWDATA, which contains the variables used in computing MyModel, but different values for these variables. In NEWDATA I would like to compute (in an automated, quick, easy,

Re: [R] Problem with ONE of the Special German Characters

2010-04-15 Thread Duncan Murdoch
On 15/04/2010 12:22 PM, Michael Stegh wrote: Dear List, I have data which contain the special German characters "ä", "ö", "ü" etc. After reading the text files into R those characters are displayed strangely, e. g. "ä" is "ä". The first step is to replace those with their typical transcripti

Re: [R] using nls for gamma distribution (a,b,d)

2010-04-15 Thread Walmes Zeviani
I never had seen someone using a density function for a mean function in nonlinear regression. The convergence problem observed can be due the model derivatives respect to the parameters. How could computationally be d.gamma/d.alpha? digamma function? Does R understand this? If your phenomena exh

[R] Unwanted boxes in legend

2010-04-15 Thread Steve Murray
Dear all, I am using the following code to generate a legend in my plot (consisting of both bars and points), but end up with boxes around my points: legend(10, par("usr")[4], c("A", "B", "C", "D"), fill=c(NA,NA, "grey28", NA), pch=c(16,4,NA,18), col=c("red","blue","grey28","yellow"), lty=FALS

Re: [R] can't find "daphnia.txt" and others while working through Crawley's R-Book

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 12:34 PM, David Hardie wrote: Thanks David, but I have searched my hard drive using the search utility in Windows (not just c:\temp - the whole drive) for the file in question and it is not there. I have also used: data() to see the names of all dataframes in the dataset

Re: [R] Exporting an rgl graph

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 12:34 PM, l...@stat.uiowa.edu wrote: The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1 ) has an editorial on including animations, 3D visualizations, and movies in on-line PDF files supporting JCGS articles. The online supplements to the editorial

Re: [R] using nls for gamma distribution (a,b,d)

2010-04-15 Thread Peter Ehlers
I don't know what else is wrong, but do you really want a shape parameter equal to 28? gamma(28) is about 10^28. That's not a model I would trust. -Peter Ehlers On 2010-04-15 9:37, Asif Wazir wrote: Dear all i want to estimated the parameter of the gamma density(a,b,d) f(x) = (1/gamma(b)*(a^b

Re: [R] can't find "daphnia.txt" and others while working through Crawley's R-Book

2010-04-15 Thread Christian Raschke
The files associated with the book can be found on the author's website here: http://www.bio.ic.ac.uk/research/mjcraw/therbook/index.htm Just download what you need and put the files somewhere where you can find them. HTH, Christian

Re: [R] Regression w/ interactions

2010-04-15 Thread Frank E Harrell Jr
Michael Dykes wrote: So, am i wrong to /assume /that the reasons my professor is asking us to find a high R^2 & adjusted R^2, low Cp (near what p+1, if i remember correctly), low PRESS, & AIC is b/c the data is randomly generated (b/c he has stated that all of the data for *all *of these hw ass

Re: [R] Add header line to large text file

2010-04-15 Thread Zev Ross
Thanks to Wensui Liu and Jim Holtman for responses. Using sed was a good, quick (non-R) suggestion. Thanks! Zev Wensui Liu wrote: if i were you, i probably will use 1 line of sed to do such task instead of R to insert headers in the file. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross [1] w

Re: [R] Exporting an rgl graph

2010-04-15 Thread luke
The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1) has an editorial on including animations, 3D visualizations, and movies in on-line PDF files supporting JCGS articles. The online supplements to the editorial include examples. The 3D examples related to the misc3d pack

Re: [R] can't find "daphnia.txt" and others while working through Crawley's R-Book

2010-04-15 Thread David Hardie
Thanks David, but I have searched my hard drive using the search utility in Windows (not just c:\temp - the whole drive) for the file in question and it is not there. I have also used: data() to see the names of all dataframes in the datasets package as well as: data(package=.packages(all.ava

Re: [R] can't find "daphnia.txt" and others while working through Crawley's R-Book

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 11:42 AM, David Hardie wrote: I have a feeling that this is an embarassingly simple fix, but I've been at it for most of the morning and can't get things figured out. I'm trying to work through some examples in Crawley's "The R Book". I have installed packages and li

[R] Problem with ONE of the Special German Characters

2010-04-15 Thread Michael Stegh
Dear List, I have data which contain the special German characters "ä", "ö", "ü" etc. After reading the text files into R those characters are displayed strangely, e. g. "ä" is "ä". The first step is to replace those with their typical transcription, e. g. "ä" becomes "ae" by using the gsub c

Re: [R] Alignment of x-axis labels

2010-04-15 Thread Peter Ehlers
On 2010-04-15 7:23, Steve Murray wrote: Dear all, I'm having trouble getting the correct spacing between x-axis labels on a barplot. This is the command I'm using to generate the plot: temp<- barplot(precip, beside=TRUE, xaxt="n", las=1, xpd=FALSE, col="grey28", ylim=c(0, max(precip))) Here

Re: [R] Gaussian Quadrature Numerical Integration In R

2010-04-15 Thread Ravi Varadhan
Here is an example showing how to use variable transformation: k <- 5 myfn <- function(x, k) exp(-k * x^2) # this is the integrand over (-Inf, +Inf) # Integration using `integrate' function ans1 <- integrate(myfn, lower=-Inf, upper=Inf, k=k)$val # Now w

Re: [R] Help with TukeyHSD

2010-04-15 Thread eugen pircalabelu
Hi, Is this what you want? ?TukeyHSD summary(fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)) tk.fm1<-TukeyHSD(fm1, "tension", ordered = TRUE) tk.fm1 (tk.fm1[[1]][,4]) Eugen Pircalabelu (0032)471 842 140 (0040)727 839 293 - Original Message From: Amit Patel To: R-help@r-

[R] Poblems wih EBImage

2010-04-15 Thread R Heberto Ghezzo, Dr
Hello, Working with Windows 7 in a HP laptop with R-2.10.1 I download and installed ImageMagick-6.3.7.7-Q16-Windows-dll.exe and GTK 2.12.9-win32-2, then downloaded and installed from local file EBImage_3.2.0.zip and I got: > library(EBImage) Loading required package: abind Error in inDL(x, as.log

Re: [R] Efficient algorithm to get a solution path for ridge regression?

2010-04-15 Thread Charles C. Berry
On Wed, 14 Apr 2010, Kenneth Lo wrote: With the use of the LARS algorithm, a path of solutions corresponding to a sequence of the regularization parameter can be obtained for LASSO (or even the elastic net, a hybrid between LASSO and ridge) at the cost of one linear regression. In terms of com

[R] can't find "daphnia.txt" and others while working through Crawley's R-Book

2010-04-15 Thread David Hardie
I have a feeling that this is an embarassingly simple fix, but I've been at it for most of the morning and can't get things figured out. I'm trying to work through some examples in Crawley's "The R Book". I have installed packages and libraries as described in the book, but when I try, for

[R] using nls for gamma distribution (a,b,d)

2010-04-15 Thread Asif Wazir
Dear all i want to estimated the parameter of the gamma density(a,b,d) f(x) = (1/gamma(b)*(a^b)) * ((x-d)^(b-1)) * exp{-(x-d)/a)} for x>d f(x) = Age specific fertility rate x = age when i run this in R by usling nls() gamma.asfr <- formula(asfr ~ (((age-d)^(b-1))/((gamma(b))*(a^b)))* exp(-((age-

Re: [R] Gaussian Quadrature Numerical Integration In R

2010-04-15 Thread Ines Azaiez
Hi Ravi, Thanks for your response. I already considered the change of variables but I was wondering if there were already a function in R which do the same thing in an optimized way. My function f(x) is complicated so adding a change of variable makes the algorithm takes a lot of time to give ou

Re: [R] sum specific rows in a data frame

2010-04-15 Thread Vijay Nori
This is very cool...thanks Hadley. When are you planning to release that version? On Thu, Apr 15, 2010 at 9:09 AM, hadley wickham wrote: > On Thu, Apr 15, 2010 at 1:16 AM, Chuck wrote: > > Depending on the size of the dataframe and the operations you are > > trying to perform, aggregate or ddpl

Re: [R] search and replace

2010-04-15 Thread Vijay Nori
Dennis -- it does! However, how can a more generic situation be handled where South,North,East,West are replaced by x2,d6,qqw,mQ respectively? Thanks. On Wed, Apr 14, 2010 at 11:41 PM, Dennis Murphy wrote: > Hi: > > Does this work for you? > [[alternative HTML version deleted]] _

[R] step size truncated out of bounds

2010-04-15 Thread Judith Trunschke
Dear helpers, in course of my master thesis I trie to program a GLM to model the number of seeds produced per flower relates to the time they were exposed to pollinators (categorical with two levels), the altitude of population (categorical with two levels) and the species (categorical wi

Re: [R] Problems getting symbols() to show table data

2010-04-15 Thread Guy Green
Thanks, balloonplot() is great and gets me really close to what I am after. However it then brings me to a slightly different problem - I wonder if anyone can suggest where I am going wrong? Again with simplified data ( http://n4.nabble.com/file/n1890724/test-data.txt test-data.txt ):

Re: [R] Add header line to large text file

2010-04-15 Thread Wensui Liu
if i were you, i probably will use 1 line of sed to do such task instead of R to insert headers in the file. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross wrote: > All, > > I have a 30 million record text file without header information. I would > like to add a header to this file without reading it

Re: [R] Add header line to large text file

2010-04-15 Thread jim holtman
You also might take a look at using file.append to speed up the process. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross wrote: > All, > > I have a 30 million record text file without header information. I would > like to add a header to this file without reading it first. Is this > possible? The cod

Re: [R] Add header line to large text file

2010-04-15 Thread jim holtman
If you want to place the header at the beginning of the file, then you have to read/write the entire file to get that first line in. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross wrote: > All, > > I have a 30 million record text file without header information. I would > like to add a header to thi

[R] Connecting to Rserve remotely

2010-04-15 Thread Nupur Gupta
Hi All, I am having problems connecting to Rserve remotely. I am trying to connect to Rserve which is running on a developer machine. At the developer machine, I have created a file C:\Program Files\R\R-2.7.1\etc\Rserve.conf with a single line remote enable At this machine, I check the IP address

Re: [R] Selecting derivative order penalty for thin plate spline regression (GAM - mgcv)

2010-04-15 Thread Simon Wood
Christos, I would base choise of `m' on the AIC or GCV scores, (or on the REML or Marginal likelihood scores, if these have been used for smoothness selection). I don't think the m=2 basis will be strictly nested within the m=3 basis will it? So that rules out you option a. Option b is poor si

[R] Help with TukeyHSD

2010-04-15 Thread Amit Patel
Hi I am conducting ANOVA using the aov function I am also conducting TukeyHSD to obtain which of the groups show variance How can I obtain the first three p values from the list below? >zzz.aov <- aov(Intensity ~ Group, data = zzzanova) > TukeyHSD(zzz.aov) Tukey multiple comparisons of means

Re: [R] sum specific rows in a data frame

2010-04-15 Thread hadley wickham
The problem is that the new version of plyr is incompatible with ggplot2, so I need to make some changes there before I can release it. Hopefully this summer. Hadley On Thu, Apr 15, 2010 at 1:33 PM, Vijay Nori wrote: > This is very cool...thanks Hadley. When are you planning to release that > v

Re: [R] sum specific rows in a data frame

2010-04-15 Thread hadley wickham
I think the development version also fixes that problem, but it's hard to know without a reproducible example Hadley On Thu, Apr 15, 2010 at 2:33 PM, Jeff Newmiler wrote: > This is good news, although I have recently encountered what I consider > excessive memory usage in the addition of k

[R] Add header line to large text file

2010-04-15 Thread Zev Ross
All, I have a 30 million record text file without header information. I would like to add a header to this file without reading it first. Is this possible? The code below does what I want except that the readLines portion takes quite a long time. Is there a way around reading the lines? I'm w

  1   2   >