Re: [R] memory error

2010-04-01 Thread Sharpie
Janet Choate-2 wrote: Thanx for clarification on stating my problem, Charlie. I am attempting to merge to files, i.e.: hi39 = merge(comb[,c(hillID,geo)], hi.h39, by=c(hillID)) if this is relevant or helps to explain: the file 'comb' is 3 columns and 1127 rows the file 'hi.h39' is 5

[R] Keeping only one date for each patient ID and disease SITE

2010-04-01 Thread Eric O'Neill
Dear List Subscribers, I am working on the following problem and was wondering if there is some command or set of commands to solve it: Thank you in advance, Eric 1. The dataset Cancer0 may have multiple dates of treatment (DATE) for each patient (ID) with a given disease (SITE).

Re: [R] Summing data based on certain conditions

2010-04-01 Thread Law, Jason
This should do the trick: data$date - as.Date(data$date, '%m/%d/%Y') data$month - format(data$date, '%Y-%m') by(data$rammday, data$month, sum) Hope that helps, Jason -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stephan

[R] Scope and assignment: baffling

2010-04-01 Thread Jeff Brown
Hi, The code below creates a value, x$a, which depending on how you access it evaluates to its initial value, or to what it's been changed to. The last two lines should, I would have thought, evaluate to the same value, but they don't. f - function () { x - NULL; x$a - 0;

Re: [R] pdf files in loops

2010-04-01 Thread Sam Thomas
Have you tried plot(pic) -Original Message- From: Berwin A Turlach ber...@maths.uwa.edu.au Sent: Wednesday, March 31, 2010 10:15 PM To: James Rome jamesr...@gmail.com Cc: r-help@r-project.org r-help@r-project.org Subject: Re: [R] pdf files in loops On Wed, 31 Mar 2010 22:06:48 -0400

Re: [R] Scope and assignment: baffling

2010-04-01 Thread Peter Dalgaard
Jeff Brown wrote: Hi, The code below creates a value, x$a, which depending on how you access it evaluates to its initial value, or to what it's been changed to. The last two lines should, I would have thought, evaluate to the same value, but they don't. f - function () { x -

Re: [R] dot plot

2010-04-01 Thread Ivan Calandra
Hi, It might be too late but I'll answer anyway. First, don't forget to follow the posting guide and provide some sample data, your code, and/or exactly what you're looking for. And as Jannis said, search also the archive. Here are some thoughts about what you can do (if I understand you

Re: [R] interpretation of p values for highly correlated logistic analysis

2010-04-01 Thread Claus O'Rourke
Thank you both for your advice. I'll follow up on it, but it is good to know that this is a known effect. Claus On Wed, Mar 31, 2010 at 3:02 PM, Stephan Kolassa stephan.kola...@gmx.de wrote: Hi Claus, welcome to the wonderful world of collinearity (or multicollinearity, as some call it)! You

Re: [R] Sharing levels across multiple factor vectors

2010-04-01 Thread Peter Dalgaard
Jeff Brown wrote: Sorry for spamming. I swear I had worked on that problem a long time before posting. But I just figured it out: I have to change the values, which are represented as integers, not strings. So the following code will do it: df - data.frame ( a = factor( c( bob,

[R] Rule Induction

2010-04-01 Thread fascob
Hi, I want to produce some rules (for example with JRip, M5Rules, OneR, PART, ect.) with R and then work with produced rules. Does anyone know how to work with the rules? Regards, fascob -- View this message in context: http://n4.nabble.com/Rule-Induction-tp1747834p1747834.html Sent from

Re: [R] pdf files in loops

2010-04-01 Thread Paul Hiemstra
James Rome wrote: On 3/31/2010 10:01 PM, Berwin A Turlach wrote: G'day James, On Wed, 31 Mar 2010 21:44:31 -0400 James Rome jamesr...@gmail.com wrote: I need to make a bunch of PDF files of histograms. [...] What am I doing wrong?

Re: [R] emacs: reformat \items paragraph in .Rd

2010-04-01 Thread Hans-Peter Suter
Many thanks! The missing empty line was the problem, and M-q works great. Hans-Peter Esc-q or M-q will wrap a whole paragraph. The only problem is that you need to make sure the paragraph you want to wrap is separated from other __

[R] Stack with factors

2010-04-01 Thread Kenneth Roy Cabrera Torres
Hi R users: I found that I cannot stack() a data.frame with factors. db1-data.frame(replicate(6,factor(sample(c(A,B),6,replace=TRUE str(db1) db2-stack(db1) db2 db2 does not have any row. How can I stack them by the variables X1,X2,...,X6? Thank you for your help. Kenneth

Re: [R] Stack with factors

2010-04-01 Thread Ken Knoblauch
Kenneth Roy Cabrera Torres krcabrer at une.net.co writes: Hi R users: I found that I cannot stack() a data.frame with factors. db1-data.frame(replicate(6,factor(sample(c(A,B),6,replace=TRUE str(db1) db2-stack(db1) db2 db2 does not have any row. How can I stack them by the variables

Re: [R] barplot and line

2010-04-01 Thread Tal Galili
Hi Roslina In order to get the X coordinates of your barplot, assign the barplot to a variable: x.coor - barplot(something) Now use the x.coor for your line plot. Cheers, Tal Contact Details:--- Contact me:

[R] reading excel into R

2010-04-01 Thread cheba meier
Dear all, I am new R user and I am sure that this question has been asked quite often and I have also googled it and read about it! I understood that in order to read excel sheet into R you need to open it and saved it as csv or text, is this true? or you can use read.delim2 and read.csv2 to do

Re: [R] Stack with factors

2010-04-01 Thread Peter Ehlers
On 2010-04-01 3:53, Ken Knoblauch wrote: Kenneth Roy Cabrera Torreskrcabrerat une.net.co writes: Hi R users: I found that I cannot stack() a data.frame with factors. db1-data.frame(replicate(6,factor(sample(c(A,B),6,replace=TRUE str(db1) db2-stack(db1) db2 db2 does not have any row. How

Re: [R] reading excel into R

2010-04-01 Thread milton ruser
Dear Cheba Please, install the package xlsReadWrite I suppose that read.csv is to read csv files, not xls ones. cheers milton On Thu, Apr 1, 2010 at 6:19 AM, cheba meier cheba.me...@googlemail.comwrote: Dear all, I am new R user and I am sure that this question has been asked quite often

[R] Palette color order in bwplot (lattice violin plot) vs. boxplot

2010-04-01 Thread Luigi Ponti
Hello, I am trying to give different colors to boxes in a violin plot obtained via bwplot from lattice package using a color palette from RColorBrewer: require(RColorBrewer) MyPalette - brewer.pal(6, Set3) A call to: boxplot(count ~ spray, data = InsectSprays, col = MyPalette) yields

Re: [R] Sharing levels across multiple factor vectors

2010-04-01 Thread hadley wickham
On Thu, Apr 1, 2010 at 3:05 AM, Peter Dalgaard pda...@gmail.com wrote: Jeff Brown wrote: Sorry for spamming.  I swear I had worked on that problem a long time before posting. But I just figured it out: I have to change the values, which are represented as integers, not strings.  So the

Re: [R] reading excel into R

2010-04-01 Thread Gabor Grothendieck
See this link for a number of alternatives: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows On Thu, Apr 1, 2010 at 6:19 AM, cheba meier cheba.me...@googlemail.com wrote: Dear all, I am new R user and I am sure that this question has been asked quite often and I have also

[R] fitness of regression tree: how to measure???

2010-04-01 Thread vibha patel
Hello, I'm using rpart function for creating regression trees. now how to measure the fitness of regression tree??? thanks n Regards, Vibha [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] RCOM Save

2010-04-01 Thread koj
Thank you. Unfortunately this recommendation does not solve my problem and I don't know why. Here is my test-code: pfad-paste(C:/...,xls,sep=.) xl - COMCreate(Excel.Application) xl[[Visible]] - FALSE wkbk - xl$Workbooks()$Open(pfad) sh - xl$ActiveSheet() A3R -

Re: [R] regular expression help to extract specific strings from text

2010-04-01 Thread Tony B
Thank you guys, both solutions work great! Seems I have two new packages to investigate :) Regards, Tony Breyal On 31 Mar, 14:20, Tony B tony.bre...@googlemail.com wrote: Dear all, Lets say I have the following: x - c(Eve: Going to try something new today..., Adam: Hey @Eve, how are you

Re: [R] fitness of regression tree: how to measure???

2010-04-01 Thread Frank E Harrell Jr
vibha patel wrote: Hello, I'm using rpart function for creating regression trees. now how to measure the fitness of regression tree??? thanks n Regards, Vibha If the sample size is less than 20,000, assume that the tree is a somewhat arbitrary representation of the relationships in the data

Re: [R] RCOM Save

2010-04-01 Thread Henrique Dallazuanna
Try this; On Thu, Apr 1, 2010 at 7:00 AM, koj jens.k...@gmx.li wrote: Thank you. Unfortunately this recommendation does not solve my problem and I don't know why. Here is my test-code: pfad-paste(C:/...,xls,sep=.) xl - COMCreate(Excel.Application) xl[[Visible]] - FALSE

[R] About logistic regression

2010-04-01 Thread Silvano
Hi, I have a dichotomous variable (Q1) whose answers are Yes or No. Also I have 2 categorical explanatory variables (V1 and V2) with two levels each. I used logistic regression to determine whether there is an effect of V1, V2 or an interaction between them. I used the R and SAS, just for

Re: [R] About logistic regression

2010-04-01 Thread Eik Vettorazzi
Hi Silvano, this is FAQ 7.17 http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-does-the-output-from-anova_0028_0029-depend-on-the-order-of-factors-in-the-model_003f hth. Silvano schrieb: Hi, I have a dichotomous variable (Q1) whose answers are Yes or No. Also I have 2 categorical explanatory

Re: [R] About logistic regression

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 8:19 AM, Silvano wrote: Hi, I have a dichotomous variable (Q1) whose answers are Yes or No. Also I have 2 categorical explanatory variables (V1 and V2) with two levels each. I used logistic regression to determine whether there is an effect of V1, V2 or an interaction

Re: [R] RCOM Save

2010-04-01 Thread Erich Neuwirth
Please be more precise. You seem not to use the rcom (note the lowercase name) package, but the RDCOMClient package which is not available from CRAN but as part of the Omegahat project. rcom has a command comCreateObject and RDCOMClient has a command COMCreate. The code you supplied will

Re: [R] Sharing levels across multiple factor vectors

2010-04-01 Thread Henrique Dallazuanna
Try this also: df[] - as.numeric(unlist(df)) df On Thu, Apr 1, 2010 at 2:53 AM, Jeff Brown dopethatwantsc...@yahoo.com wrote: Sorry for spamming.  I swear I had worked on that problem a long time before posting. But I just figured it out: I have to change the values, which are represented

[R] R: Generative Topographic Map

2010-04-01 Thread mauede
Thank you. I figured that out myself last night. I always forget that read.table does not actually read data into a matrix. GTM MatLab toolbox comes with a nice guide to use the package which may as well become an R vignette. Anyway, I got the singular matrix warnings myself and do not know

[R] how to construct a time series

2010-04-01 Thread n.via...@libero.it
Hi, I need to generate the time series of the production, but as I'm new to this topic I am not able to do that. This is what the time series should be: PROD(t)=PROD(t,T) PROD(t-1)=PROD(t-1,T) PROD(t-2)=PROD(t-1)*PROD(t-2,T-1)/PROD(t-1,T-1) PROD(t-3)=PROD(t-2)*PROD(t-3,T-2)/PROD(t-2,T-2) ... ...

[R] export R data as web service

2010-04-01 Thread Johann Hibschman
I'd like to access data in my R session from elsewhere via HTTP. My particular use case would be R on Linux, accessing data from Windows, all on the same intranet. Naively, when I say this, I imagine something like: theData - big.calculation.returning.data.frame() startHttpServer(port=8675)

[R] Factorial regression with multiple features: how to remove non-significant features?

2010-04-01 Thread Vijaya Parthiban
Hello all, I am trying to do factorial regression using lm() like this (example): model-lm(y ~ x1 + x2 + x3 + x4 + x1*x2*x3*x4) The final term 'x1*x2*x3*x4' adds all possible interactions between explanatory variables to the model. i.e. x1:x2, x1:x2:x3, etc, etc. Now, the issue is that some of

[R] Basic Question (Real Basic)

2010-04-01 Thread Idgarad
I am having a total brain fart... complete and total. This is part R, Part Statstitics, Part My Brain is on vacation apparently. Ok I have a time series I need to LOG and DIFF for ARIMA with Regressors. Say 100 data points. Obviously when I diff the series once I get 98 data points now. So what

[R] Regarding the De-bugger in R

2010-04-01 Thread Ayush Raman
Hi, I would like to know if there is some debugger in R where I can check that I am not using or not doing calculation on my previously stored objects. I can't use rm (list = ls()) to remove all the objects since I am using a for loop for reading 500 files and making making common calculation for

Re: [R] Factorial regression with multiple features: how to remove non-significant features?

2010-04-01 Thread Ista Zahn
Hi Parthiban, I urge you to rethink your approach, or at least proceed with extreme caution. Lower-order terms involved in higher-order interactions may not be what you think they are. And there are serious problems with stepwise model selection. I encourage you to read a good regression

Re: [R] barplot and line

2010-04-01 Thread Greg Snow
Look at the 1st example on the help page for the updateusr function in the TeachingDemos package for a way to align a barplot and information added to it. See the axis function for creating your own custom axis. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

[R] Line Graph Labels

2010-04-01 Thread zachcp
I have a line graph that is flat and has sharp peaks (mass spectrometry data). I would like to plot my data and label the peaks with their x-axis value. I know it is possible to have a function to find local maxima and then to use these values in a label command but I am hoping there is a

Re: [R] barplot and line

2010-04-01 Thread Tal Galili
Hi Roslina, here is a simple example: barplot.x.location - barplot(c(12:17)) points(x = barplot.x.location, y = rep(10, length(aa)), col = 2, pch = 7) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845

Re: [R] Regarding the De-bugger in R

2010-04-01 Thread Tal Galili
Hi Ayush, Could you supply with a simple code to try to give an answer on ? Thanks, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il

Re: [R] Adding RcppFrame to RcppResultSet causes segmentation fault

2010-04-01 Thread Matthew Dowle
Rob, Please look again at Romain's reply to you on 19th March. He informed you then that Rcpp has its own dedicated mailing list and he gave you the link. Matthew R_help Help rhelp...@gmail.com wrote in message news:ad1ead5f1003291753p68d6ed52q572940f13e1c0...@mail.gmail.com... Hi, I'm a

[R] How to get the scale limits in lattice plot

2010-04-01 Thread James Rome
I am drawing a density histogram, and want to label the plots with the mean using ltext(). But I need the x,y coordinates to feed into ltext, and I can't calculate them easily from my data. Is there a way to get the x and y ranges being used for the plot, so I can put the text at the correct

[R] bagging survival tree

2010-04-01 Thread paaventhan jeyaganth
Dear R users, I have problem with bagging survial tree after finding the final tree. f-rpart(Surv(time ,dead )~ x1 +x2+ x3+x4+x5+x6, data=crp) f.prun-prune(f,cp=0.036701) # final tree i have 3 endnote including #the variable x3 and x4 how can i use the bagging code i use like this but it

[R] Using GIS data in R

2010-04-01 Thread Scott Duke-Sylvester
I have a simple problem: I need to load a ERSI shapefile of US states and check whether or not a set of points are within the boundary of these states. I have the shapefile, I have the coordinates but I'm having a great deal of difficulty bringing the two together. The problem is the various GIS

Re: [R] Regarding the De-bugger in R

2010-04-01 Thread Ayush Raman
Snippet of my code: library(foreign) function1 - function(y,t){ ###do some matrix operations ## } function2 - function(y){ y1 = permute(y) F1 = function1(y1) } setwd(C:\\Results\\) ## Read Multiple Files files.total = list.files() for (j in files.total){ table1 = read.table(j) ### do

Re: [R] GUI /IDE

2010-04-01 Thread ManInMoon
Thanks Philippe, I will look at sciviews - I have never used it before. I use Rcmdr, and I find I am often selecting and running the same lines of code. I just thought if we could name them then easily call that region it would be useful. Cheers -- View this message in context:

Re: [R] Adding RcppFrame to RcppResultSet causes segmentation fault

2010-04-01 Thread Romain Francois
The thread has been handled in Rcpp-devel. Rob posted there 7 minutes after posting on r-help. FWIW, I think the problem is fixed on the Rcpp 0.7.11 version (on cran incoming) Romain Le 01/04/10 17:47, Matthew Dowle a écrit : Rob, Please look again at Romain's reply to you on 19th March.

Re: [R] Regarding the De-bugger in R

2010-04-01 Thread Tal Galili
One way I can think of is putting your loop inside a function (let's say func3) and then use: library(debug) mtrace(func3) func3() # and this at the end: mtrace.off() And see the steps... Tal Contact Details:--- Contact me:

[R] Using a Data Frame/Matrix outside a function

2010-04-01 Thread Greg Gilbert
I have code that creates the same matrices , a and b. The code creating a is not in a function and the code creating b is in a function. I would like to do operations on b like I can on a, however I can't figure out how I can return a matrix (or data frame) from a function. Thanks for your help!

Re: [R] how to construct a time series

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 9:56 AM, n.via...@libero.it wrote: Hi, I need to generate the time series of the production, but as I'm new to this topic I am not able to do that. This is what the time series should be: PROD(t)=PROD(t,T) PROD(t-1)=PROD(t-1,T)

Re: [R] How to get the scale limits in lattice plot

2010-04-01 Thread Peter Ehlers
On 2010-04-01 9:53, James Rome wrote: I am drawing a density histogram, and want to label the plots with the mean using ltext(). But I need the x,y coordinates to feed into ltext, and I can't calculate them easily from my data. Is there a way to get the x and y ranges being used for the plot, so

Re: [R] How to get the scale limits in lattice plot

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 11:53 AM, James Rome wrote: I am drawing a density histogram, and want to label the plots with the mean using ltext(). But I need the x,y coordinates to feed into ltext, and I can't calculate them easily from my data. Is there a way to get the x and y ranges being used for

Re: [R] Adding RcppFrame to RcppResultSet causes segmentation fault

2010-04-01 Thread Matthew Dowle
He could have posted into this thread then at the time to say that. Otherwise it appears like its open. Romain Francois romain.franc...@dbmail.com wrote in message news:4bb4c4b8.2030...@dbmail.com... The thread has been handled in Rcpp-devel. Rob posted there 7 minutes after posting on r-help.

Re: [R] Using a Data Frame/Matrix outside a function

2010-04-01 Thread David Winsemius
On Apr 1, 2010, at 12:16 PM, Greg Gilbert wrote: I have code that creates the same matrices , a and b. The code creating a is not in a function and the code creating b is in a function. I would like to do operations on b like I can on a, however I can't figure out how I can return a

Re: [R] predicted time length differs from survfit.coxph:

2010-04-01 Thread Thomas Lumley
On Wed, 31 Mar 2010, Parminder Mankoo wrote: Hello All, Does anyone know why length(fit1$time) length(fit2$n) in survfit.coxph output? Why is the predicted time length is not the same as the number of samples (n)? In fact it is not true that length(fit1$time) length(fit2$n), since

Re: [R] nlrq parameter bounds

2010-04-01 Thread Matthew Dowle
Ashley, This appears to be your first post to this list. Welcome to R. Over 2 days is quite a long time to wait though, so you are unlikely to get a reply now. Feedback: since nlrq is in package quantreg, its a question about a package and should be sent to the package maintainer. Some

Re: [R] sample size 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread Bert Gunter
Since Frank has made this somewhat cryptic remark (sample size 20K) several times now, perhaps I can add a few words of (what I hope is) further clarification. Despite any claims to the contrary, **all** statistical (i.e. empirical) modeling procedures are just data interpolators: that is, all

Re: [R] Scope and assignment: baffling

2010-04-01 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff Brown Sent: Wednesday, March 31, 2010 6:45 PM To: r-help@r-project.org Subject: [R] Scope and assignment: baffling Hi, The code below creates a value, x$a, which

Re: [R] sample size 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread hadley wickham
Incidentally, there is nothing new or radical in this; indeed, John Tukey, Leo Breiman, George Box, and others wrote eloquently about this decades ago. And Breiman's random forest modeling procedure explicitly abandoned efforts to build simply interpretable models (from which one might infer

Re: [R] Scope and assignment: baffling

2010-04-01 Thread Gabor Grothendieck
The code you presented is very close to object oriented in the style of the proto package. For example, library(proto) # generate a single object p p - proto(a = 0, geta = function(.) .$a, incra = function(.) .$a - .$a + 5) p$geta() p$a # same p$incra() p$geta() # Or if you

Re: [R] trying to understand lme() results

2010-04-01 Thread array chip
Thanks Dennis for the thorough explanation and correction on the design. John --- On Thu, 4/1/10, Dennis Murphy djmu...@gmail.com wrote: From: Dennis Murphy djmu...@gmail.com Subject: Re: [R] trying to understand lme() results To: array chip arrayprof...@yahoo.com Cc: R-help@r-project.org Date:

[R] time series problem: time points don't match

2010-04-01 Thread Brad Patrick Schneid
Hi, I have a time series problem that I would like some help with if you have the time. I have many data from many sites that look like this: Site.1 datetimelevel temp 2009/10/01 00:01:52.0 2.8797 18.401 2009/10/01 00:16:52.0 2.8769

[R] Best fitted curve using AIC

2010-04-01 Thread Simone Freitas
Dear fellows, I need a R script that compare known curves (e.g. logistic, exponential) with my curve. That curve was generated fitting data of forest cover (hectares) measured in 10 road distances (buffers). I´d like that comparison should be done using AICc to select the best model, that is,

Re: [R] Line Graph Labels

2010-04-01 Thread Walmes Zeviani
You can adapt the following example da - data.frame(y=rnorm(50), x=1:50) plot(y~x, data=da) abline(h=c(-2,2), lty=3) with(da, text(x[abs(y)2], y[abs(y)2], label=x[abs(y)2], pos=2)) Walmes. - ..ooo0

[R] barplot with error bar in lattice

2010-04-01 Thread milton ruser
Dear all, I have a data.frame like below and I need to plot horizonal with error bar only for upper limit. On the code below I am able to plot the bars within groups, but I need (1) change from vertical to horizonal plot and (2) add the error bar. any hint are welcome. milton

Re: [R] Sharing levels across multiple factor vectors

2010-04-01 Thread Jeff Brown
Wow, those are much more elegant. Thanks! Peter suggests: df[] - lapply(df, factor, levels=allLevels, labels=seq_along(allLevels)) Henrique suggests: df[] - as.numeric(unlist(df)) In both of those cases, why is the [] needed? When I evaluate df vs. df[], they both look the same, but

Re: [R] Best fitted curve using AIC

2010-04-01 Thread Graham Smith
Simon I need a R script that compare known curves (e.g. logistic, exponential) with my curve. That curve was generated fitting data of forest cover (hectares) measured in 10 road distances (buffers). I´d like that comparison should be done using AICc to select the best model, that is, the

Re: [R] is and the story of a typo

2010-04-01 Thread Uwe Ligges
On 31.03.2010 10:21, (Ted Harding) wrote: On 30-Mar-10 23:23:09, Jim Lemon wrote: Hi all, The gurus may pour scorn on me for not knowing this, but I happened to mistype if as is in the heat of debugging a function. As I scanned the debugged function with some satisfaction, I noticed the

Re: [R] update.packages() and install.packages() does not work more because of Error in read.dcf

2010-04-01 Thread Uwe Ligges
On 30.03.2010 23:00, R P Herrold wrote: On Tue, 30 Mar 2010, Prof Brian Ripley wrote: A hint: I have seen this exact error message with a build configured to use the system's zlib 1.2.4 (which has been out for about 2 weeks), and this incompatibility is noted in the current R 2.11.0 alpha's

Re: [R] for loop; lm() regressions; list of vectors

2010-04-01 Thread Uwe Ligges
On 30.03.2010 20:57, David Winsemius wrote: On Mar 30, 2010, at 12:42 PM, Driss Agramelal wrote: ## Hello everyone, ## ## I am trying to execute 150 times a lm regression using the 'for' loop, with 150 vectors for y, ## ## and always the same vector for x. ## ## I have an object with 150

[R] t.test data in one column

2010-04-01 Thread Marlin Keith Cox
I need a two sample t.test between M and F. The data are arranged in one column, x. Cant seem to figure how to run a two sample t.test. Not really sure what this output is giving me, but there should be no difference between M and F in the example, but summary p-value indicates this. How can I

Re: [R] Using GIS data in R

2010-04-01 Thread Don MacQueen
I'm currently doing a lot of simple GIS work in R, including points in polygon queries. My .Rprofile file has require(maptools) require(rgdal) With that as a starting point, I find that the data structures play well together. Define a coordinate reference system object with crs.ll -

[R] Regression

2010-04-01 Thread Bruce Kindseth
I am trying to learn R, and am having problems with doing a simple linear regression. I loaded data from a fixed width file, using wd=c(...), and read.fwf(...) and I can read in the file ok and it comes in as vectors in columns, which is what I expected. The problem is when I try to do a linear

[R] update.packages() and install.packages() does not work more because of Error in read.dcf

2010-04-01 Thread R P Herrold
On Thu, 1 Apr 2010, Uwe Ligges wrote: herrold, before: The true fault causing the noted message seems to be that there is a faulty compression/decompression occuring in a carried library -- would't it be better to not bundle a frozen library, and to rather simply 'flag' packages needed a

Re: [R] t.test data in one column

2010-04-01 Thread Erik Iverson
Hello, Marlin Keith Cox wrote: I need a two sample t.test between M and F. The data are arranged in one column, x. Cant seem to figure how to run a two sample t.test. Not really sure what this output is giving me, but there should be no difference between M and F in the example, but summary

Re: [R] t.test data in one column

2010-04-01 Thread Phil Spector
Marlin - Consider the following: df = data.frame(x=rep(1:4,2),y=rep(c('M','F'),c(2,2))) t.test(x~y,data=df) Welch Two Sample t-test data: x by y t = 4.899, df = 6, p-value = 0.002714 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence

Re: [R] Regression

2010-04-01 Thread Duncan Murdoch
On 01/04/2010 2:59 PM, Bruce Kindseth wrote: I am trying to learn R, and am having problems with doing a simple linear regression. I loaded data from a fixed width file, using wd=c(...), and read.fwf(...) and I can read in the file ok and it comes in as vectors in columns, which is what I

Re: [R] Regression

2010-04-01 Thread Erik Iverson
Bruce, You don't tell us what class of data your y is. Assuming y is defined in your enviroment, what does class(y) and str(y) tell you? You'll most likely have to fine-tune your data reading process, or do some post-processing to make sure the y object (and x for that matter) are the

Re: [R] Line Graph Labels

2010-04-01 Thread zachcp
Thanks Walmes, that does indeed work well for labeling all points greater than some specified value. But the problem is that while my peaks are very sharp there is more than one point along the line as it slopes up. This method will label those points as well , making the data look cluttered.

[R] pvals.fnc() with language R does not work with R 2.10.1

2010-04-01 Thread ozge gurcanli
Hi Everyone, I am using R 2.10.1. lmer function works properly, however pvals.fnc () does not despite the fact that I uploaded: - library(lme4) - library(coda) - library(languageR) This is the error message I get pvals.fnc(lexdec3.lmerE2, nsim=1)$fixed Error in

Re: [R] sample size 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread Frank E Harrell Jr
Good comments Bert. Just 2 points to add: People rely a lot on the tree structure found by recursive partitioning, so the structure needs to be stable. This requires a huge samples size. Second, recursive partitioning is not competitive with other methods in terms of predictive

[R] Aligning text in the call to the text function

2010-04-01 Thread Tighiouart, Hocine
Hi, I have text (see below) that is aligned nicely when printed in the command window in R but when plotted using text function, it does not show alignment unless I use the family=mono in the call to the text function. Is there a way to specify a different font while maintaining the alignment?

Re: [R] Aligning text in the call to the text function

2010-04-01 Thread Duncan Murdoch
On 01/04/2010 3:39 PM, Tighiouart, Hocine wrote: Hi, I have text (see below) that is aligned nicely when printed in the command window in R but when plotted using text function, it does not show alignment unless I use the family=mono in the call to the text function. Is there a way to specify a

[R] Analyzing binary data on an absolute scale and determining conditions when risks become equal between groups

2010-04-01 Thread Chaudhari, Bimal
Suppose I have a binary outcome (disease/no disease and all subjects had the same period of exposure) and 2 or 3 (categorical) predictors. I can obviously build a logistic regression model which describes the data, possibly including interaction terms, on a relative scale:

Re: [R] Line Graph Labels

2010-04-01 Thread Walmes Zeviani
You can set the number of extreme points to be labeled instead of define a cutoff. Look: da - data.frame(y=rnorm(50), x=1:50) plot(y~x, data=da) abline(h=c(-2,2), lty=3) with(da, text(x[abs(y)2], y[abs(y)2], label=x[abs(y)2], pos=2)) da - da[order(da$y),] plot(y~x, data=da) # five small and big

Re: [R] pvals.fnc() with language R does not work with R 2.10.1

2010-04-01 Thread Ben Bolker
ozge gurcanli gurcanli at cogsci.jhu.edu writes: Hi Everyone, I am using R 2.10.1. lmer function works properly, however pvals.fnc () does not despite the fact that I uploaded: - library(lme4) - library(coda) - library(languageR) This is the error message I get

Re: [R] Line Graph Labels

2010-04-01 Thread zachcp
thanks again walmes. but the new problem would be that not all of the peaks are the same intensity. therefore the top five datapoints from my highest peak have greater intensity values than the highest point in the second-highest peak. but this is once again helpful. i found that there is a

Re: [R] Aligning text in the call to the text function

2010-04-01 Thread baptiste auguie
Hi, One option with Grid graphics, m - matrix(c( 1667,3,459, 2001, 45, 34, 1996, 2,5235), dimnames=list(c(Eric Alan, Alan,John David)), ncol=3, byrow=T) ## install.packages(gridExtra, repos=http://R-Forge.R-project.org;) library(gridExtra)

[R] Course***R Advanced Programming April 2010***R Courses*** by XLSolutions Corp Seattle, San Francisco, Salt Lake City

2010-04-01 Thread s...@xlsolutions-corp.com
XLSolutions is proud to announce our April 2010 R/S-PLUS Advanced Programming course in USA *** R/S Systems: Advanced Programming *** S/R-PLUS Programming 3: Advanced Techniques and Efficiencies. More on website http://www.xlsolutions-corp.com/rplus.asp Ask for group discount and reserve

Re: [R] sample size 20K? Was: fitness of regression tree: how to measure???

2010-04-01 Thread Ravi Varadhan
The discussion of Leo Breiman's paper in Statistical Science: Statistical Modeling - The Two cultures, is a must read for all statisticians doing prediction modeling. Especially see the exchange between Cox and Breiman (I call this the Cox-Breiman duel). Ravi.

[R] Using a string as a variable name - revisited

2010-04-01 Thread Euan Reavie
I would like to revisit a problem that was discussed previously (see quoted discussion below). I am trying to do the same thing, using a string to indicate a column with the same name. I am making foo a string taken from a list of names. It matches the row where item = 5, and picks the

Re: [R] Using a string as a variable name - revisited

2010-04-01 Thread Erik Iverson
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Euan Reavie wrote: I would like to revisit a problem that was discussed previously (see quoted discussion below). I am trying to do the same thing,

Re: [R] Using a string as a variable name - revisited

2010-04-01 Thread Erik Iverson
I meant to add that I'm guessing from this: What it seems to be doing is converting the text Aulacoseira_islandica to a number (25, for some reason is that foo is a factor, but we have no way of knowing without a reproducible example. Euan Reavie wrote: I would like to revisit a problem

[R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-01 Thread Steven Worthington
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual

Re: [R] Value-at-Risk Portfolio(both equity and option)

2010-04-01 Thread zhang
Thank you very much. Since I have never heard of blotter before, now I am really excited. It seems exactly what I have been searching. Would be really grateful if you could share some codes/examples regarding to this. I did not happen to find the help file for the package. Thanks again. --

[R] A link to a collection of tutorials and videos on R.

2010-04-01 Thread datakid ..
A link to a collection of tutorials and videos on R. Tutorials: http://www.dataminingtools.net/browsetutorials.php?tag=rdmt Videos: http://www.dataminingtools.net/videos.php?id=8 __ R-help@r-project.org mailing list

Re: [R] nlrq parameter bounds

2010-04-01 Thread AJBG
Thank you for your reply Matthew, There are many things I could say about the myriad difficulties I have had in progressing with R, none worth stating here. For the record I have read the posting guidelines, at least to the extent possible in the time available. For what its worth, I think I

Re: [R] time series problem: time points don't match

2010-04-01 Thread Gabor Grothendieck
Perhaps something like this: library(zoo) library(chron) # read in data Lines1 - datetimelevel temp 2009/10/01 00:01:52.0 2.8797 18.401 2009/10/01 00:16:52.0 2.8769 18.382 2009/10/01 00:31:52.0 2.8708 18.309 2009/10/01 00:46:52.0

  1   2   >