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)

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),

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

[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] 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

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)) :

[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

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$x))

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

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 -

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)),

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,

[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

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

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 m.t.h...@ai.rug.nl 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] 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 }

[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

[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,  

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] 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

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)) :

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

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 'hard

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,

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 pjmiller...@yahoo.com To: r-help@r-project.org Subject: [R] Does sink stand for anything? Sent: Apr 15, 2010 5:12 PM Hello Everyone,

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

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] 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

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 i'm getting the following

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

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

[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 the

[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

[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

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 C++ 6.0. I

[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),

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 stands

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) This works fine .but

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) This works fine .but

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.

[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] 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 firat.ozde...@deu.edu.tr hi, i have a simulation code for some two sample tests and in the middle of the simulation, the

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

[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

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.margins =

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 which

[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

[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 __

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 erinm.hodg...@gmail.com wrote: Dear R People: Is there an equivalent for tsp

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: [1]

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 mode is

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

<    1   2