Re: [R] How to create a string containing '\/' to be used with SED?

2008-11-26 Thread seanpor
Good morning, You do not need to quote a forward slash / in R, but you do need to quote a backslash when you're inputting it... so to get a string which actually contains blah\/blah... you need to use blah\\/blah

Re: [R] LaTeX and R-scripts/-results

2008-11-26 Thread Thomas Petzoldt
Oliver Bandel wrote: Hello, at some places I read about good interaction of LaTeX and R. Can you give me a starting point, where I can find information about it? Are there special LaTeX-packages for the support, or does R have packages for support of LaTeX? Or will an external Code-Generator

[R] multiple imputation with fit.mult.impute in Hmisc - how to replace NA with imputed value?

2008-11-26 Thread Charlie Brush
I am doing multiple imputation with Hmisc, and can't figure out how to replace the NA values with the imputed values. Here's a general ourline of the process: set.seed(23) library(mice) library(Hmisc) library(Design) d - read.table(DailyDataRaw_01.txt,header=T) length(d);length(d[,1]) [1]

Re: [R] LaTeX and R-scripts/-results

2008-11-26 Thread Philipp Pagel
On Wed, Nov 26, 2008 at 08:50:33AM +0100, Oliver Bandel wrote: at some places I read about good interaction of LaTeX and R. Can you give me a starting point, where I can find information about it? Have a look at these: Sweave() xtable()(xtable) latex() (Hmisc) cu

Re: [R] Error in sqlCopy in RODBC

2008-11-26 Thread Dieter Menne
BKMooney wrote: I am trying to copy portions of tables from one SQL database to another, using sqlCopy in the RODBC package. ... I am currently getting an error: Error in sqlSave(destchannel, dataset, destination, verbose = verbose, : table 'LocalTable' already exists I can

[R] eclipse and R

2008-11-26 Thread Ruud H. koning
Hello, I am trying to install Eclipse and R on an amd64 machine running Suse linux 9.3. I have compiled R 2.8.0 with --enable-R-shlib and it seems that compilation was successfull. After starting R, I installed the latest rJava package, from the output: checking whether JRI is requested... yes

[R] Running rtest - how to/ help

2008-11-26 Thread indian scorpio
I am trying to run rTest example (XP, Eclipse, ) available with code. JRI etc are used from the rJava package (i.e. Haven't built myself) The code dosent runs properly - it shows ( i tried passing argument as --save). what else is possible. 'Creating Rengine (with arguments)' and then gets

Re: [R] how to read .sps (SPSS file extension)?

2008-11-26 Thread Eik Vettorazzi
maybe the importers of the memisc-package will help you, but I never tried them, see help(importers,package=memisc) At a first glance it seems, that you have to split your file manually, but maybe there is another way. hth. livio finos schrieb: sorry, you are completely right! sps is not

Re: [R] how to read .sps (SPSS file extension)?

2008-11-26 Thread Eik Vettorazzi
sorry for the typo, help(importer, package=memisc) will do the trick. Eik Vettorazzi schrieb: maybe the importers of the memisc-package will help you, but I never tried them, see help(importers,package=memisc) At a first glance it seems, that you have to split your file manually, but

Re: [R] construct a vector

2008-11-26 Thread Marc Schwartz
on 11/26/2008 07:11 AM axionator wrote: Hi all, I have an unkown number of vectors (=2) all of the same length. Out of these, I want to construct a new one as follows: having vectors u,v and w, the resulting vector z should have entries: z[1] = u[1], z[2] = v[1], z[3] = w[1] z[4] = u[2],

Re: [R] construct a vector

2008-11-26 Thread Richard . Cotton
I have an unkown number of vectors (=2) all of the same length. Out of these, I want to construct a new one as follows: having vectors u,v and w, the resulting vector z should have entries: z[1] = u[1], z[2] = v[1], z[3] = w[1] z[4] = u[2], z[5] = v[2], z[6] = w[2] ... i.e. go through the

Re: [R] multiple imputation with fit.mult.impute in Hmisc - how to replace NA with imputed value?

2008-11-26 Thread Frank E Harrell Jr
Charlie Brush wrote: I am doing multiple imputation with Hmisc, and can't figure out how to replace the NA values with the imputed values. Here's a general ourline of the process: set.seed(23) library(mice) library(Hmisc) library(Design) d - read.table(DailyDataRaw_01.txt,header=T)

Re: [R] construct a vector

2008-11-26 Thread Wacek Kusnierczyk
axionator wrote: Hi all, I have an unkown number of vectors (=2) all of the same length. Out of these, I want to construct a new one as follows: having vectors u,v and w, the resulting vector z should have entries: z[1] = u[1], z[2] = v[1], z[3] = w[1] z[4] = u[2], z[5] = v[2], z[6] = w[2]

Re: [R] construct a vector

2008-11-26 Thread axionator
Thanks, works fine. Armin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Question about Kolmogorov-Smirnov Test

2008-11-26 Thread Uwe Ligges
Ricardo Ríos wrote: Hi wizards I have the following code for a Kolmogorov-Smirnov Test: z-c(1.6,10.3,3.5,13.5,18.4,7.7,24.3,10.7,8.4,4.9,7.9,12,16.2,6.8,14.7) ks.test(z,pexp,1/10)$statistic The Kolmogorov-Smirnov statistic is: D 0.293383 However, I have calculated the

Re: [R] memory limit

2008-11-26 Thread seanpor
Good afternoon, The short answer is yes, the long answer is it depends. It all depends on what you want to do with the data, I'm working with dataframes of a couple of million lines, on this plain desktop machine and for my purposes it works fine. I read in text files, manipulate them, convert

Re: [R] How to measure the significant difference between two time series

2008-11-26 Thread Gerard M. Keogh
Q1: Quick answer a) you need to remove the seasonality - there s/b a tool in the time series package to do this - though I'm not familar enough with R to know this. b) check the resulting series to see if it is stationary - acf decays quickly i.e. within a couple of lags. c) if two series are

Re: [R] plotting density for truncated distribution

2008-11-26 Thread Chris Andrews
Another option mydata - rnorm(10) mydata - mydata[mydata0] plot(density(c(mydata, -mydata), from=0)) If you want the area under the curve to be one, you'll need to double the density estimate dx - density(c(mydata, -mydata), from=0) dx$y - dx$y * 2 plot(dx) Chris Jeroen Ooms wrote:

Re: [R] Running rtest - how to/ help

2008-11-26 Thread indian scorpio
Well after trying a couple of things - rtest.java example with command line argument being --zero-init this is the error Creating Rengine (with arguments) Rengine created, waiting for R # # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION

Re: [R] Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices

2008-11-26 Thread jim holtman
Your time is being taken up in cor.test because you are calling it 100,000 times. So grin and bear it with the amount of work you are asking it to do. Here I am only calling it 100 time: m1 - matrix(rnorm(1), ncol=100) m2 - matrix(rnorm(1), ncol=100) Rprof('/tempxx.txt')

[R] construct a vector

2008-11-26 Thread axionator
Hi all, I have an unkown number of vectors (=2) all of the same length. Out of these, I want to construct a new one as follows: having vectors u,v and w, the resulting vector z should have entries: z[1] = u[1], z[2] = v[1], z[3] = w[1] z[4] = u[2], z[5] = v[2], z[6] = w[2] ... i.e. go through the

[R] how to check linearity in Cox regression

2008-11-26 Thread Terry Therneau
On examining non-linearity of Cox coefficients with penalized splines - I have not been able to dig up a completely clear description of the test performed in R or S-plus. One iron clad way to test is to fit a model that has the variable of interest x as a linear term, then a second model

[R] Chi-Square Test Disagreement

2008-11-26 Thread Andrew Choens
I was asked by my boss to do an analysis on a large data set, and I am trying to convince him to let me use R rather than SPSS. I think Sweave could make my life much much easier. To get me a little closer to this goal, I ran my analysis through R and SPSS and compared the resulting values. In all

Re: [R] eclipse and R

2008-11-26 Thread Tobias Verbeke
Hi Ruud, I forwarded your message to the StatET (R in Eclipse) list; there might be StatET users with a similar setup as yours on that list (and the StatET developer is more likely to pick up your question there). Best, Tobias Hello, I am trying to install Eclipse and R on an amd64 machine

Re: [R] Efficient passing through big data.frame and modifying select

2008-11-26 Thread Johannes Graumann
Marvelous! Thanks guys for your hints and time! Very smooth now! Joh On Wednesday 26 November 2008 03:41:49 Henrik Bengtsson wrote: Alright, here are another $.02: using 'use.names=FALSE' in unlist() is much faster than the default 'use.names=TRUE'. /Henrik On Tue, Nov 25, 2008 at 6:40 PM,

[R] Finding Stopping time

2008-11-26 Thread Debanjan Bhattacharjee
Can any one help me to solve problem in my code? I am actually trying to find the stopping index N. So first I generate random numbers from normals. There is no problem in finding the first stopping index. Now I want to find the second stopping index using obeservation starting from the one after

Re: [R] Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices

2008-11-26 Thread David Winsemius
He might try rcorr from Hmisc instead. Using your test suite, it gives about a 20% improvement on my MacPro: m1 - matrix(rnorm(1), ncol=100) m2 - matrix(rnorm(1), ncol=100) Rprof('/tempxx.txt') system.time(cor.pvalues - apply(m1, 1, function(x) { apply(m2, 1, function(y) {

[R] memory limit

2008-11-26 Thread iwalters
I'm currently working with very large datasets that consist out of 1,000,000 + rows. Is it at all possible to use R for datasets this size or should I rather consider C++/Java. -- View this message in context:

[R] Needs suggestions for choosing appropriate R packages

2008-11-26 Thread zhijie zhang
Dear all, I am thinking to fit a multilevel dataset with R. I have found several possible packages for my task, such as glmmPQL(MASS),glmm(repeated),glmer(lme4), et al. I am a little confused by these functions. Could anybody tell me which function/package is the correct one to analyse my

[R] plm pakage

2008-11-26 Thread valeria pedrina
Hi everyone, I'm doing a panel data analisys and I want to run three estimation methods against my available dataset:pooled OLS, random and fixed effects. I have 9 individuals and 5 observation for each individual. this is my code,what's wrong? X - cbind(y,x) X -data.frame(X) ooo-pdata.frame(X,9)

[R] S4 object

2008-11-26 Thread Laurina Guerra
Hola buen dia!! Alguien me podría orientar acerca de que es la clase S4 object y como funciona de la forma mas sencilla posible. Se les agradecería su respuesta lo mas pronto posible.. gracias!! [[alternative HTML version deleted]] __

Re: [R] Chi-Square Test Disagreement

2008-11-26 Thread Chuck Cleland
On 11/26/2008 9:51 AM, Andrew Choens wrote: I was asked by my boss to do an analysis on a large data set, and I am trying to convince him to let me use R rather than SPSS. I think Sweave could make my life much much easier. To get me a little closer to this goal, I ran my analysis through R

Re: [R] Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices

2008-11-26 Thread Jorge Ivan Velez
Hi Daren, Here is another aproach a little bit faster taking into account that I'm using your original matrices. My session info is at the end. I'm using a 2.4 GHz Core 2-Duo processor and 3 GB of RAM. # Data set.seed(123) m1 - matrix(rnorm(10), ncol=100) m2 - matrix(rnorm(10),

[R] S4 slot containing either aov or NULL

2008-11-26 Thread Thomas Kaliwe
Dear listmembers, I would like to define a class with a slot that takes either an object of class aov or NULL. I have been reading S4 Classes in 15 pages more or less and Lecture: S4 classes and methods #First I tried with list and NULL setClass(listOrNULL) setIs(list, listOrNULL)

[R] odfWeave and XML... on a Mac

2008-11-26 Thread Tubin
I'm trying out odfWeave in a Mac environment and getting some odd behavior. Having figured out that the code snippets only work if they're in certain fonts, I was able to get R to run a test document through and produce an output document. After running it, though, I get a warning message:

Re: [R] Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices

2008-11-26 Thread hadley wickham
On Wed, Nov 26, 2008 at 8:14 AM, jim holtman [EMAIL PROTECTED] wrote: Your time is being taken up in cor.test because you are calling it 100,000 times. So grin and bear it with the amount of work you are asking it to do. Here I am only calling it 100 time: m1 - matrix(rnorm(1),

Re: [R] Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices

2008-11-26 Thread Daren Tan
Out of desperation, I made the following function which hadley beats me to it :P. Thanks everyone for the great help. cor.p.values - function(r, n) { df - n - 2 STATISTIC - c(sqrt(df) * r / sqrt(1 - r^2)) p - pt(STATISTIC, df) return(2 * pmin(p, 1 - p)) } Date: Wed, 26 Nov 2008

Re: [R] plotting density for truncated distribution

2008-11-26 Thread Jeroen Ooms
thank you, both solutions are really helpful! -- View this message in context: http://www.nabble.com/plotting-density-for-truncated-distribution-tp20684995p20703469.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] RES: S4 object

2008-11-26 Thread Rodrigo Aluizio
Take a look at the links you will found on this previous post of the list. http://tolstoy.newcastle.edu.au/R/help/06/01/18259.html I myself don't know anything about this subject. Sorry, but you probably will found what you need there. Best Wishes Rodrigo. -Mensagem original- De:

[R] RES: memory limit

2008-11-26 Thread Leandro Marino
It depends of the number of the variables. If you are using 2 or 3 variables you can do some things. I should you read about ff package and ASOR packages they manage the dataset to do some kind of IO. Regards, -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome

[R] ts subscripting problem

2008-11-26 Thread andrew collier
hi, i am having trouble getting a particular time series to plot. this is what i have: class(irradiance) [1] ts irradiance[1:30] 197811 197812 197901 197902 197903 197904 197905 197906 1366.679 1366.729 1367.476 1367.739 1368.339 1367.883 1367.916 1367.055 197907 197908

[R] survreg and pweibull

2008-11-26 Thread Andrew Beckerman
Dear all - I have followed the thread the reply to which was lead by Thomas Lumley about using pweibull to generate fitted survival curves for survreg models. http://tolstoy.newcastle.edu.au/R/help/04/11/7766.html Using the lung data set, data(lung) lung.wbs - survreg( Surv(time,

[R] Second y-axis

2008-11-26 Thread Dr. Alireza Zolfaghari
Hi list, In the following code, how can I place the percentage label away from numbers in the second y-axis (lets say all should be inside plot area)? Thanks Alireza = require(grid) vp- viewport(x=.1,y=.1,width=.6,height=.6,just=c(left, bottom)) pushViewport(vp)

Re: [R] multiple imputation with fit.mult.impute in Hmisc - how to replace NA with imputed value?

2008-11-26 Thread Charlie Brush
Frank E Harrell Jr wrote: Charlie Brush wrote: I am doing multiple imputation with Hmisc, and can't figure out how to replace the NA values with the imputed values. Here's a general ourline of the process: set.seed(23) library(mice) library(Hmisc) library(Design) d -

Re: [R] multiple imputation with fit.mult.impute in Hmisc - how to replace NA with imputed value?

2008-11-26 Thread Frank E Harrell Jr
Charlie Brush wrote: Frank E Harrell Jr wrote: Charlie Brush wrote: I am doing multiple imputation with Hmisc, and can't figure out how to replace the NA values with the imputed values. Here's a general ourline of the process: set.seed(23) library(mice) library(Hmisc) library(Design)

Re: [R] Chi-Square Test Disagreement

2008-11-26 Thread Berwin A Turlach
G'day Andy, On Wed, 26 Nov 2008 14:51:50 + Andrew Choens [EMAIL PROTECTED] wrote: I was asked by my boss to do an analysis on a large data set, and I am trying to convince him to let me use R rather than SPSS. Very laudable of you. :) This is the output from R: chisq.test(test29)

Re: [R] Chi-Square Test Disagreement

2008-11-26 Thread Andrew Choens
On Thu, 2008-11-27 at 00:46 +0800, Berwin A Turlach wrote: Chuck explained already the reason for this small difference. I just take issue about it being an important difference. In my opinion, this difference is not important at all. It would only be important to people who are still

[R] Problem with aovlmer.fnc in languageR

2008-11-26 Thread Mats Exter
Dear R list, I have a recurring problem with the languageR package, specifically the aovlmer.fnc function. When I try to run the following code (from R. H. Baayen's textbook): # Example 1: library(languageR) latinsquare.lmer - lmer(RT ~ SOA + (1 | Word) + (1 | Subject),

Re: [R] S4 slot containing either aov or NULL

2008-11-26 Thread Matthias Kohl
Dear Thomas, take a look at setOldClass ... ## register aov (an S3-class) as a formally defined class setOldClass(aov) ## list and some others are special cases; cf. class ? list ## now your code should work setClassUnion(aovOrNULL, c(aov, NULL)) setClass(c1, representation(value =

Re: [R] Chi-Square Test Disagreement

2008-11-26 Thread Ted Harding
On 26-Nov-08 17:57:52, Andrew Choens wrote: [...] And, since I do work for government, if I ask for a roomful of calculators, I might just get them. And really, what am I going to do with a roomful of calculators? --andy Insert something humorous here. :-) Next time the launch of an

Re: [R] Error in sqlCopy in RODBC

2008-11-26 Thread BKMooney
I tried your suggestion... library(RODBC) channel = odbcConnectAccess(db.mdb) sqlCopy(channel,Select * from tab,newtab,destchannel=channel, safer=TRUE,append=TRUE,rownames=FALSE,fast=FALSE) odbcClose(channel) however, I am still running into errors, both when appending to an existing table,

[R] Smoothed 3D plots

2008-11-26 Thread Jorge Ivan Velez
DeaR list, I'm trying to represent some information via 3D plots. My data and session info are at the end of this message. So far, I have tried scatterplot3d (scatterplot3d), persp3d (rgl), persp (graphics) and scatter3d (Rmcdr) but any of them gave me what I'd like to have as final result

Re: [R] weighted ftable

2008-11-26 Thread Andrew Choens
I didn't know that. That is exactly what I need. On Tue, 2008-11-25 at 13:00 -0800, Thomas Lumley wrote: On Mon, 24 Nov 2008, Andrew Choens wrote: I need to do some fairly deep tables, and ftable() offers most of what I need, except for the weighting. With smaller samples, I've just used

Re: [R] Chi-Square Test Disagreement

2008-11-26 Thread Andrew Choens
Next time the launch of an incoming nuclear strike is detected, set them to work as follows (following Karl Pearson's historical precedent): Anti-aircraft guns all day long: Computing for the Ministry of Munitions JUNE BARROW GREEN (Open University) From January 1917 until

[R] Reshape with var as fun.aggregate

2008-11-26 Thread locklin . jason
I used to be able to use variance for fun.aggregate, but since I upgraded from R 2.6 to 2.7 (Ubuntu hardy to intrepid), it no longer works. library(reshape) data(french_fries) ffm - melt(french_fries, id=1:4, na.rm = TRUE) cast(ffm, rep ~ treatment, length) rep 1 2 3 1 1 579 578

[R] Creating a vector based on lookup function

2008-11-26 Thread PDXRugger
I am still searching for a solution to what i think is a simple problem i am having with building a vector in a for loop. I have built a more understandable example so hopefully that will help..help you, help me, if you know what i mean. dev=400 #test location model TAZs to reference

[R] Request for Assistance in R with NonMem

2008-11-26 Thread Michael White
Hi I am having some problems running a covariate analysis with my colleage using R with the NonMem program we are using for a graduate school project. R and NonMem run fine without adding in the covariates, but the program is giving us a problem when the covariate analysis is added. We think the

Re: [R] Smoothed 3D plots

2008-11-26 Thread Mark Difford
Hi Jorge, In general terms, I would like to plot a smoothed surface with h4 and h11 in the x and y axis, respectively, and y in the z axis. I think that a smoothing procedure should work but I don't know how to get that work in R. There are quite a few options. If I were you I would have

[R] SPSSyntax function

2008-11-26 Thread Adrian Dusa
Dear all, I've created a function called spssyntax that creates a syntax for variable labels and value labels in SPSS (in the *sps* syntax format that was recently discussed), using a list of such labels in R. The entry list looks like this (between the ### signs): ### labels - list()

[R] R and SPSS

2008-11-26 Thread Applejus
Hi, I have a code in R. Could anyone give me the best possible way (or just ways!) to integrate it in SPSS? Thanks! -- View this message in context: http://www.nabble.com/R-and-SPSS-tp20708367p20708367.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Creating a vector based on lookup function

2008-11-26 Thread Charles C. Berry
On Wed, 26 Nov 2008, PDXRugger wrote: I am still searching for a solution to what i think is a simple problem i am having with building a vector in a for loop. I have built a more understandable example so hopefully that will help..help you, help me, if you know what i mean. dev=400 #test

Re: [R] Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices

2008-11-26 Thread Thomas Lumley
You can do much better by doing the correlations as a matrix operation: system.time({ + m1-scale(m1) + m2-scale(m2) + r-crossprod(m1,m2)/100 + df-100 + tstat-sqrt(df)*r/sqrt(1-r^2) + p-pt(tstat,df) + }) user system elapsed 0.025 0.004 0.028

Re: [R] memory limit

2008-11-26 Thread Stavros Macrakis
I routinely compute with a 2,500,000-row dataset with 16 columns, which takes 410MB of storage; my Windows box has 4GB, which avoids thrashing. As long as I'm careful not to compute and save multiple copies of the entire data frame (because 32-bit Windows R is limited to about 1.5GB address space

[R] Installing packages based on the license

2008-11-26 Thread Ted Mendum
Hello, I would like have an automatic way to avoid installing packages that I cannot use due to license restrictions. For example, the conf.design package is limited to non-commercial use, and since I work for a for-profit business, I cannot use it. I found out about the license terms of

Re: [R] R and SPSS

2008-11-26 Thread Liviu Andronic
Hello, On Wed, Nov 26, 2008 at 9:25 PM, Applejus [EMAIL PROTECTED] wrote: I have a code in R. Could anyone give me the best possible way (or just ways!) to integrate it in SPSS? I would doubt you could do this, but for the least provide commented, minimal, self-contained, reproducible code. It

[R] SVM

2008-11-26 Thread simon abai bisrat
Hi All, I fitted several classifiers in a two class problem. I then used the package 'yaImpute' - to apply my predictive models to asciigrids and thereby generate a probability maps. So far I successfully used yaImpute to generate maps for Random Forests, Classification trees, Generalized

[R] Estimates of coefficient variances and covariances from a multinomial logistic regression?

2008-11-26 Thread Grant Gillis
Hello and thanks in advance for any help, I am using the 'multinom' function from the nnet package to calculate a multinomial logistic regression. I would like to get a matrix estimates of the estimated coefficient variances and covariances. Am I missing some easy way to extract these? Grant

Re: [R] Installing packages based on the license

2008-11-26 Thread Charles C. Berry
On Wed, 26 Nov 2008, Ted Mendum wrote: Hello, I would like have an automatic way to avoid installing packages that I cannot use due to license restrictions. For example, the conf.design package is limited to non-commercial use, and since I work for a for-profit business, I cannot use it. I

Re: [R] Estimates of coefficient variances and covariances from a multinomial logistic regression?

2008-11-26 Thread Charles C. Berry
On Wed, 26 Nov 2008, Grant Gillis wrote: Hello and thanks in advance for any help, I am using the 'multinom' function from the nnet package to calculate a multinomial logistic regression. I would like to get a matrix estimates of the estimated coefficient variances and covariances. Am I

Re: [R] Installing packages based on the license

2008-11-26 Thread Duncan Murdoch
On 26/11/2008 4:43 PM, Ted Mendum wrote: Hello, I would like have an automatic way to avoid installing packages that I cannot use due to license restrictions. For example, the conf.design package is limited to non-commercial use, and since I work for a for-profit business, I cannot use it.

Re: [R] memory limit

2008-11-26 Thread Henrik Bengtsson
On Wed, Nov 26, 2008 at 1:16 PM, Stavros Macrakis [EMAIL PROTECTED] wrote: I routinely compute with a 2,500,000-row dataset with 16 columns, which takes 410MB of storage; my Windows box has 4GB, which avoids thrashing. As long as I'm careful not to compute and save multiple copies of the

[R] Drawing a tree in R

2008-11-26 Thread Severin Hacker
Hi, I've been trying to make use of the dendrogram class to plot a tree. However, my attempts have failed so far because I'm not sure how to build up the nested list. (where do I have to store the nodes?). The tree I want to be drawn is like this: in the form (node, left child,right child)

Re: [R] Reshape with var as fun.aggregate

2008-11-26 Thread hadley wickham
Hi Jason, The reason you are getting this error is that the latest version of reshape uses fun.aggregate(numeric(0)) to figure out what missing values should be filled in with. Unfortunately there was a brief period in R versions when var(numeric(0)) returned an error rather than a missing

Re: [R] R and SPSS

2008-11-26 Thread Andrew Choens
On Wed, 2008-11-26 at 12:25 -0800, Applejus wrote: Hi, I have a code in R. Could anyone give me the best possible way (or just ways!) to integrate it in SPSS? Thanks! You will need a SPSS registration, but go here and get the SPSS r plugin. http://www.spss.com/devcentral/ It lets you

Re: [R] R and SPSS

2008-11-26 Thread David Winsemius
On Nov 26, 2008, at 7:57 PM, Andrew Choens wrote: It lets you access R from within SPSS. Best of both worlds. -- Insert something humorous here. :-) OK, I'll bite. It lets you access R from within SPSS. Best of both worlds. __

[R] Boundary value problem

2008-11-26 Thread karthik jayasurya
Hi, I want to solve an ordinary differential equation as boundary value problem. I already did it as initial value problem, but now I have constraints for variable values at more than one point. I searched with the key words , boundary value problem, shooting method, but couldnt find any

[R] Business Data Sets

2008-11-26 Thread nmarti
Can someone please help me, or point me in the right direction, to find some “Business” data sets. In the next couple of weeks I will be teaching a “small business” class/seminar, and my intensions are to preach the importance of collecting data on business operations and how to analyze that

Re: [R] How to create a string containing '\/' to be used with SED?

2008-11-26 Thread ikarus
Thanks Sean!! I followed you suggestion to use gsub() and it worked perfectly! I still can't create a string with inside \/ (e.g., a - ..\\/path\\/file doesn't work, R complains and the \\ are removed), but I don't care, gsub() does the same job as sed and without using any system call.

[R] base:::rbind

2008-11-26 Thread Fernando Saldanha
It seems that after loading the package timeSeries the function base:::rbind is replaced by methods:::rbind identical(base:::rbind, methods:::rbind) [1] FALSE rbb = base:::rbind library(timeSeries) Loading required package: timeDate identical(base:::rbind, methods:::rbind) [1] TRUE

[R] ggplot2 problem

2008-11-26 Thread steve
I'm using ggplot2 2.0.8 and R 2.8.0 df = data.frame(Year = rep(1:5,2)) m = ggplot(df, aes(Year=Year)) m + geom_bar() Error in get(calculate, env = ., inherits = TRUE)(., ...) : attempt to apply non-function __ R-help@r-project.org mailing list

Re: [R] ggplot2 problem

2008-11-26 Thread Eric
aes() does not have an argument, Year but it does have an argument x so try: df - data.frame(Year = rep(1:5,2)) m - ggplot(df, aes(x=Year)) m + geom_bar() (It works for me.) Eric steve wrote: I'm using ggplot2 2.0.8 and R 2.8.0 df = data.frame(Year = rep(1:5,2)) m = ggplot(df,

Re: [R] ggplot2 problem

2008-11-26 Thread steve
Yes - that's it. thank you Steve __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] How to create a string containing '\/' to be used with SED?

2008-11-26 Thread seanpor
What is the problem error message? I can say fred - blah1\\/blah2\\/blah3 and then the string looks like... cat(#, fred, '#\n', sep='') #blah1\/blah2\/blah3# If you just ask R to print it then it looks like... fred [1] blah1\\/blah2\\/blah3 when you're playing with strings and regular

[R] as.numeric in data.frame, but only where it is possible

2008-11-26 Thread Kinoko
Hi, I would like to convert my character sequences in my matrix/ data.frame into numeric where it is possible. I would also like to retain my alphabetic character strings in their original forms. 5.15.1 hm hm k-matrix(c(aa, bb, 1,2, 4.3, 0), nrow=2) mode(k) - numeric # ln1 coerces