[R] save txt file

2009-09-24 Thread Eiger
Hi, I have 2 questions: Question 1: I define 2 variables: a, b: a-rbinom(4,10,0.8) output: [1] 9 7 8 8 b-rbinom(2,6,0.7) output: [1] 4 5 if I write: write.table(a, file = filename, etc. etc. ) it save only the values of variable a. There is a way to save in a .txt file the values

Re: [R] any advice on web interfaces to R?

2009-09-24 Thread jverzani
Mitchell Maltenfort mmalten at gmail.com writes: I saw http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces and I'm still not sure yet which platform (Linux, Windows, etc.) I'll be working on -- and no, it's not under my control to pick. I was wondering if anyone out there had

[R] Stretch the x-axis for better alignment comparison

2009-09-24 Thread Maggie
I have the following code that aligns the two graphs. Problem is that in .pdf it gives me it x-axis (0-100) is broken down into 0-20, 20-40..and so on. I wonder if there is for it to display the x-axis (and y-axis) in more detail than that. I'd appreciate your input -- pdf(file=VECTOR ICA

[R] Box plot

2009-09-24 Thread alphaace
Hi, Is there a way I can plot the median as well as the quantiles in the actual boxplot using the boxplot command? Thanks -- View this message in context: http://www.nabble.com/Box-plot-tp25531261p25531261.html Sent from the R help mailing list archive at Nabble.com.

[R] set choose.files directory?

2009-09-24 Thread mdusaire
Hi, I've been trying to set the directory for choose.files as follows: [R2.9.0 running on XP] setwd(C:/Documents and Settings/2/Data) getwd() infile2 = choose.files(filters = Filters[c(txt,All),], caption = Choose ECD datafile) #...do a bunch of stuff... It appears the working directory

[R] scaled Schoenfeld residuals

2009-09-24 Thread Greg Dropkin
hi sorry if this has been discussed before, but I'm wondering why the scaled Schoenfeld residuals do not follow the defining formula for obtaining them from the ordinary Schoenfeld residuals, but are instead offset by the estimated parameter values. e.g. library(survival) attach(ovarian)

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-24 Thread ws
Webb Sprague webb.sprague at gmail.com writes: xtabs(~wkhp, x, exclude=NULL, na.action=na.pass) wkhp  20   30   40   45   60 NA   1    1   10    1    3    4 now this doesn't even work table(wtf, exclude=NULL) wtf [0,10) [10,20) [20,30) [30,40) [40,50) [50,60)

[R] Statistical analysis

2009-09-24 Thread Chris Li
Hi all, I have got two datasets, one of them is rainfall data and the other one is groundwater level data. I would like to see whether there is a correlation between these two datasets and if there is, to what extent they are correlated. My stats background is limited, therefore any advice on

Re: [R] How to show number in the %f format?

2009-09-24 Thread David Winsemius
On Sep 23, 2009, at 6:42 PM, Peng Yu wrote: On Wed, Sep 23, 2009 at 5:16 PM, David Winsemius dwinsem...@comcast.net wrote: On Sep 23, 2009, at 5:58 PM, Peng Yu wrote: Hi, I have the following matrix, which is printed %e format (in C's way). I am wondering how make it be printed in %f

[R] Odp: Box plot

2009-09-24 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 23.09.2009 21:17:10: Hi, Is there a way I can plot the median as well as the quantiles in the actual boxplot using the boxplot command? AFAIK boxplot produces box which marks upper and lower quartile and median. So you shall be more precise

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-24 Thread David Winsemius
On Sep 23, 2009, at 5:11 PM, ws wrote: Webb Sprague webb.sprague at gmail.com writes: xtabs(~wkhp, x, exclude=NULL, na.action=na.pass) wkhp 20 30 40 45 60 NA 11 10134 now this doesn't even work Try: wtf - factor(x, levels(c(levels(wtf), NA),

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-24 Thread David Winsemius
On Sep 24, 2009, at 3:06 AM, David Winsemius wrote: On Sep 23, 2009, at 5:11 PM, ws wrote: Webb Sprague webb.sprague at gmail.com writes: xtabs(~wkhp, x, exclude=NULL, na.action=na.pass) wkhp 20 30 40 45 60 NA 11 10134 now this doesn't even work Try:

Re: [R] Stretch the x-axis for better alignment comparison

2009-09-24 Thread Philipp Pagel
On Wed, Sep 23, 2009 at 11:25:23AM -0700, Maggie wrote: I have the following code that aligns the two graphs. Problem is that in .pdf it gives me it x-axis (0-100) is broken down into 0-20, 20-40..and so on. I wonder if there is for it to display the x-axis (and y-axis) in more detail than

Re: [R] save txt file

2009-09-24 Thread Daniel Malter
any r manual helps here, and there are many easy ways to do it. ?cbind ?matrix ?data.frame If you need it in rows, matrix transposition helps, or add the byrow argument when using the matrix function (or by.row; I don't remember from the top of my head). ?dim could also do the job if you make

Re: [R] set choose.files directory?

2009-09-24 Thread Schalk Heunis
See http://finzi.psych.upenn.edu/Rhelp08/2009-March/192978.html You can do something like: default.search = paste(getwd(),/*.txt,sep=) infile2 = choose.files(default.search,filters = Filters[c(txt,All),], caption = Choose ECD datafile) Schalk Heunis On Wed, Sep 23, 2009 at 8:57 PM,

Re: [R] stripchart with pch %in% 21:25 with bg

2009-09-24 Thread Jean lobry
stripchart.formula() works for me with your modification to stripchart.default(). Great! But you don't need the 'bordered' pch for that. Indeed, but this may improve lisibility: # n - 500 x - rnorm(n) y - rnorm(n) fac1 - rep(c(male, female), n) fac2 - rep(c(blue, red), each = n/2)

Re: [R] Reading data

2009-09-24 Thread Jim Lemon
On 09/23/2009 10:42 PM, Ashta wrote: Dear R-users, I am a new user for R. I am eager to lean about it. I wanted to read and summary of the a simple data file I used the following, rel- read.table(C:/Documents and Settings/ashta/My Documents/R_data/rel.dat,

Re: [R] re peated measures

2009-09-24 Thread Tal Galili
check for missing values. Tal On Wed, Sep 23, 2009 at 3:27 PM, pompon julien.pom...@agr.gc.ca wrote: Hi, I am performing a repeated measures 2-way ANOVA to assess the influence of plant and leaf on aphid fecundity. Fecundity is measured for each aphid on a single leaf. Here is what I

Re: [R] Stretch the x-axis for better alignment comparison

2009-09-24 Thread Jim Lemon
On 09/24/2009 04:25 AM, Maggie wrote: I have the following code that aligns the two graphs. Problem is that in .pdf it gives me it x-axis (0-100) is broken down into 0-20, 20-40..and so on. I wonder if there is for it to display the x-axis (and y-axis) in more detail than that. I'd appreciate

Re: [R] Statistical analysis

2009-09-24 Thread Paul Hiemstra
Chris Li wrote: Hi all, I have got two datasets, one of them is rainfall data and the other one is groundwater level data. I would like to see whether there is a correlation between these two datasets and if there is, to what extent they are correlated. My stats background is limited,

Re: [R] Statistical analysis

2009-09-24 Thread Arien Lam
Hi Chris, If I understand your question correctly, what you want is both easy and hard. Easy: # making a reproducible example, as asked in the posting guide # two vectors water - rnorm(1000) rain - rgamma(1000,.5) # the following does everything you mention and more summary(lm(water~rain))

[R] Downloading currency data from from Yahoo

2009-09-24 Thread Bogaso
Hi, I wanted to download some currency data using quantmod package, however got following error : getSymbols('USD/GBP',src='yahoo') Error in download.file(paste(yahoo.URL, s=, Symbols.name, a=, from.m, : cannot open URL

Re: [R] save txt file

2009-09-24 Thread Eiger
cls59 wrote: Hope this helps! -Charlie Thanks!!! :) -- View this message in context: http://www.nabble.com/save-data-in-a-txt-file-tp25531307p25554140.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Multiply Normal Curves

2009-09-24 Thread KABELI MEFANE
R -helpers   i have been trying to do this problem without must success,i managed to do a graph for x, but it is not what i want to define,(i want to specify number of observations as well). I have also been able to do simple rendom sample.  

[R] aggregate() - error message

2009-09-24 Thread Juliane Struve
Dear list,   would anybody be able to tell me why the statement   Tripstatistics=aggregate(TripsData[2:3],by=list(Trip=Tripmatch),FUN=mean)   seems to work well with TripsData 1 but not with TripsData 2 ?   With TripsData 2 it yields   Error in FUN(X[[1L]], ...) : arguments must have same length

[R] Maximum likelihood estimation of parameters make no biological sense

2009-09-24 Thread Luis Ridao Cruz
R-help, I'm trying to estimate some parameters using the Maximum Likehood method. The model describes fish growth using a sigmoidal-type of curve: fn_w - function(params) { Winf - params[1] k - params[2] t0 - params[3] b - params[4]

[R] Fw: Re: Multiple Normal Curves

2009-09-24 Thread KABELI MEFANE
Sorry about the subject --- On Thu, 24/9/09, KABELI MEFANE kabelimef...@yahoo.co.uk wrote: From: KABELI MEFANE kabelimef...@yahoo.co.uk Subject: Re: [R] Multiply Normal Curves To: R-help@r-project.org Date: Thursday, 24 September, 2009, 11:48 AM R -helpers   i have been trying to do this

[R] Bug

2009-09-24 Thread dhansekaran
Hello R users I tried to get maximum of sale date from my dataframe using sqldf in R. First time when i was executing the following code sqldf(select max(sale_date) from test1) i got the result as 9997.0 BUT when i was running the same for second time, the result was 2031-04-09 (this is

Re: [R] aggregate() - error message

2009-09-24 Thread Paul Emberson
Hi, Are you trying to get columns 2 and 3 from TripsData in which case you need to say TripsData[,2:3] ? Paul Juliane Struve wrote: Dear list, would anybody be able to tell me why the statement Tripstatistics=aggregate(TripsData[2:3],by=list(Trip=Tripmatch),FUN=mean) seems to work

Re: [R] aggregate() - error message

2009-09-24 Thread Jorge Ivan Velez
Hi Juliane, Try TripsData[, 2:3] instead of TripsData[ 2:3 ] in the aggregate call. HTH, Jorge On Thu, Sep 24, 2009 at 6:52 AM, Juliane Struve wrote: Dear list, would anybody be able to tell me why the statement Tripstatistics=aggregate(TripsData[2:3],by=list(Trip=Tripmatch),FUN=mean)

[R] problem on SUSE Linux Enterprise Server 10 (ia64)

2009-09-24 Thread Yuan Zhidong
Dear Sir, When I install R on SUSE Linux Enterprise Server 10 (ia64) (Linux a450 2.6.16.21-0.8-default #1 SMP Mon Jul 3 18:25:39 UTC 2006 ia64 ia64 ia64 GNU/Linux) it reported the wrong messages at the end: # ./configure checking build system type...

Re: [R] Bug

2009-09-24 Thread Gabor Grothendieck
Please read and follow the last line to every message on r-help. On Thu, Sep 24, 2009 at 5:32 AM, dhansekaran dhana...@gmail.com wrote: Hello R users I tried to get maximum of sale date from my dataframe using sqldf in R. First time when i was executing the following code sqldf(select

Re: [R] Fw: Re: Multiple Normal Curves

2009-09-24 Thread Jim Lemon
On 09/24/2009 08:57 PM, KABELI MEFANE wrote: Sorry about the subject --- On Thu, 24/9/09, KABELI MEFANEkabelimef...@yahoo.co.uk wrote: From: KABELI MEFANEkabelimef...@yahoo.co.uk Subject: Re: [R] Multiply Normal Curves To: R-help@r-project.org Date: Thursday, 24 September, 2009, 11:48 AM R

[R] problem in forcing variables in CART

2009-09-24 Thread Naveena
Hai Can someone tel me whether it is possible to force in Variables at various levels of the tree in CART. I have been using RPART for CART which comes with PARTYKIT package (is this package good for CART or is there any other better package?). I am facing a problem with the tree it

[R] superimposing xyplots on same scale

2009-09-24 Thread Larry White
I have two xyplots that i want to superimpose (code below). By default they are displayed on slightly different y scales (one runs from 10 to 25, the other from 10 to 30). I would like to force them both onto the same scale (10 to 30) so the relation between the two is clear. Is there a way to do

Re: [R] aggregate() - error message

2009-09-24 Thread Juliane Struve
Dear all, thanks you very much for replying. However, this does not seem to solve the problem. I still get the same error message when using TripsData[,2:3]. Is there anything else that could be wrong with this statement or the data ? What length is the error message referring to ? Many

Re: [R] aggregate() - error message

2009-09-24 Thread Juliane Struve
Dear Jorge, thank you very much for your help. So with() was missing. Tripstatistics=with(TripsData,aggregate(TripsData[,3:4],by=list(Trip=Tripmatch),FUN=mean)) works. Best wishes, Juliane  Dr. Juliane Struve Environmental Scientist 10, Lynwood Crescent Sunningdale SL5 0BL 01344 620811

[R] P-value and R-squared variable selection criteria

2009-09-24 Thread Lucas Sevilla García
Hi R community I have a question. I'll explain my situation. I have to build a climate model to obtain monthly and annual temperature from 2004 to 2008 from a specif area in Almeria (Spain). To build this climate model, I will use Multiple regression. My dependant variable will be monthly and

[R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
All, I'm trying again with a slightly more generic version of my first question. I can extract the plotted values from hist(), boxplot(), and even plot.randomForest(). Observe: # get some data dat - rnorm(100) # grab histogram data hdat - hist(dat) hdat #provides details of the hist

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread David Winsemius
On Sep 24, 2009, at 9:09 AM, Tim Howard wrote: All, I'm trying again with a slightly more generic version of my first question. I can extract the plotted values from hist(), boxplot(), and even plot.randomForest(). Observe: # get some data dat - rnorm(100) # grab histogram data hdat -

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
Whoops, sorry. Here is the full set with the missing lines: library(ROCR) data(ROCR.xval) pred - prediction(ROCR.xval$predictions, ROCR.xval$labels) perf - performance(pred,tpr,fpr) RCdat - plot(perf, avg=threshold) RCdat Thanks. Tim David Winsemius dwinsem...@comcast.net 9/24/2009 9:25 AM On

[R] Downloading data from from internet

2009-09-24 Thread Bogaso
Hi all, I want to download data from those two different sources, directly into R : http://www.rateinflation.com/consumer-price-index/usa-cpi.php http://eaindustry.nic.in/asp2/list_d.asp First one is CPI of US and 2nd one is WPI of India. Can anyone please give any clue how to download them

Re: [R] P-value and R-squared variable selection criteria

2009-09-24 Thread JLucke
Lucas This problem is very old --- older than keypunches. There are several methods for selecting variables (forward, backwards, both, all subsets) using a variety of criteria (p-values, R^2, adjusted R^2, Cp, AIC, BIC, and more). Be sure you understand the methods, especially the tendency to

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread David Winsemius
On Sep 24, 2009, at 9:09 AM, Tim Howard wrote: All, I'm trying again with a slightly more generic version of my first question. I can extract the plotted values from hist(), boxplot(), and even plot.randomForest(). Observe: # get some data dat - rnorm(100) # grab histogram data hdat -

Re: [R] superimposing xyplots on same scale

2009-09-24 Thread baptiste auguie
Hi, try ?as.layer in the latticeExtra package. HTH, baptiste 2009/9/24 Larry White ljw1...@gmail.com: I have two xyplots that i want to superimpose (code below).  By default they are displayed on slightly different y scales (one runs from 10 to 25, the other from 10 to 30). I would like to

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tobias Sing
Tim, if I understand correctly, you are trying to get the numerical values of averaged cross-validation curves. Unfortunately the plot function of ROCR does not return anything in the current version (it's a good suggestion to change this). If you want a quick fix, you could change the

Re: [R] P-value and R-squared variable selection criteria

2009-09-24 Thread Daniel Malter
Don't throw out the baby with the bath water just yet. Note that even though your first model is insignificant, the R-squared is very high. This is because you fit the whole model with intercept and three coefficients on 1 degree of freedom. You need to first import the data, then run the model,

Re: [R] Statistical analysis

2009-09-24 Thread Arun.stat
Rainfall data is widely accepted as Random walk process and hence it is non-stationary. Therefore if correlation or regression coef. is measured on raw data then you may land in the world of spurious measures. I would suggest you to check whether unit root is there in your data or not first. If

Re: [R] Bug

2009-09-24 Thread Gabor Grothendieck
You have found a bug. It would be best to use dput(test1) to show unambiguously display what is in test1 but in the absence of that I will assume that its as in test1 shown below. library(sqldf) test1 - data.frame(sale_date = as.Date(c(2008-08-01, 2031-01-09, + 1990-01-03, 2007-02-03,

[R] Modelling

2009-09-24 Thread Ashta
Dear R-users, Suppose I have the followin g sample of data, 0 1 2 4 3 1 2 1 3 1 1 3 3 4 1 0 1 2 1 2 1 4 1 4 2 1 2 2 1 1 The first variable is the response variable where 0 is defective and 1 normal. The other four factors( x1,x2,x3,x4) that influence

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-24 Thread hadley wickham
wtf - factor(x, levels(c(levels(wtf), NA), exclude=NULL) xtabs (~ wtf, exclude=NULL, na.action=na.pass) Also see addNA. Hadley -- http://had.co.nz/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
David, Thank you for your reply. Yes, I can access the y-values slot with p...@y-values but, note that in the cross-validation example (ROCR.xval), the plot function averages across the list of ten vectors in the y-values slot. I might be able to create a function to average across these ten

Re: [R] scaled Schoenfeld residuals

2009-09-24 Thread Thomas Lumley
On Wed, 23 Sep 2009, Greg Dropkin wrote: hi sorry if this has been discussed before, but I'm wondering why the scaled Schoenfeld residuals do not follow the defining formula for obtaining them from the ordinary Schoenfeld residuals, but are instead offset by the estimated parameter values.

Re: [R] xtable - print - suppress output

2009-09-24 Thread Thomas Lumley
On Mon, 21 Sep 2009, David Winsemius wrote: On Sep 21, 2009, at 5:52 PM, Martin Batholdy wrote: I use xtable to convert data.frames to html tables. But when I use the print-command I always get the whole output printed even if I just want to save the html table into a variable; table -

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
Yes, that's exactly what I am after. Thank you for clarifying my problem for me! I'll try to dive into the plot.performance function. Best, Tim Tobias Sing tobias.s...@gmail.com 9/24/2009 9:57 AM Tim, if I understand correctly, you are trying to get the numerical values of averaged

Re: [R] Downloading data from from internet

2009-09-24 Thread cls59
Bogaso wrote: Hi all, I want to download data from those two different sources, directly into R : http://www.rateinflation.com/consumer-price-index/usa-cpi.php http://eaindustry.nic.in/asp2/list_d.asp First one is CPI of US and 2nd one is WPI of India. Can anyone please give any

[R] graphics mailing list?

2009-09-24 Thread baptiste.auguie
Dear all, Would it make sense to have a separate mailing list (special interest group*) for Grid graphics? (or is there one already?) I don't feel comfortable asking questions about the design of new a new grid class in R-help where I'm guessing most people won't be interested. Of course having

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-24 Thread David Winsemius
On Sep 24, 2009, at 10:06 AM, hadley wickham wrote: wtf - factor(x, levels(c(levels(wtf), NA), exclude=NULL) xtabs (~ wtf, exclude=NULL, na.action=na.pass) Also see addNA. That is nice. The addNA function does not exactly jump off the page for the (too) casual reader. In the context of

[R] graphics mailing list?

2009-09-24 Thread baptiste.auguie
Dear all, Would it make sense to have a separate mailing list (special interest group*) for Grid graphics? (or is there one already?) I don't feel comfortable asking questions about the design of new a new grid class in R-help where I'm guessing most people won't be interested. Of course having

Re: [R] graphics mailing list?

2009-09-24 Thread Duncan Murdoch
On 9/24/2009 10:34 AM, baptiste.auguie wrote: Dear all, Would it make sense to have a separate mailing list (special interest group*) for Grid graphics? (or is there one already?) I don't feel comfortable asking questions about the design of new a new grid class in R-help where I'm guessing

Re: [R] graphics mailing list?

2009-09-24 Thread Romain Francois
Why just grid ? why not a list for all kind of graphics ? On 09/24/2009 04:34 PM, baptiste.auguie wrote: Dear all, Would it make sense to have a separate mailing list (special interest group*) for Grid graphics? (or is there one already?) I don't feel comfortable asking questions about the

Re: [R] How to show number in the %f format?

2009-09-24 Thread Don MacQueen
There is also the formatC function, whose description is Formatting numbers individually and flexibly, using 'C' style format specifications. -Don At 2:28 AM -0400 9/24/09, David Winsemius wrote: On Sep 23, 2009, at 6:42 PM, Peng Yu wrote: On Wed, Sep 23, 2009 at 5:16 PM,

Re: [R] Statistical analysis

2009-09-24 Thread Greg Snow
Since todays ground water may be influenced by yesterdays rainfall, you may want to look at the dynlm package and possibly lag.plot and the zoo package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original

Re: [R] making R print on screen

2009-09-24 Thread Romain Francois
On 09/24/2009 05:26 PM, ld7631 wrote: Hello! I am running a for loop. In the loop I am producing some intermediary results and asking R to print it (of the type below). However, I noticed - when the task is complicated and takes a lot of time, R does not print those intermediary results

Re: [R] making R print on screen

2009-09-24 Thread Marc Schwartz
On Sep 24, 2009, at 10:26 AM, ld7631 wrote: Hello! I am running a for loop. In the loop I am producing some intermediary results and asking R to print it (of the type below). However, I noticed - when the task is complicated and takes a lot of time, R does not print those intermediary results

Re: [R] making R print on screen

2009-09-24 Thread ld7631
Thanks a lot, everyone! On Thu, Sep 24, 2009 at 11:41 AM, Mario Valle mva...@cscs.ch wrote: ?flush.console Ciao!        mario ld7631 wrote: Hello! I am running a for loop. In the loop I am producing some intermediary results and asking R to print it (of the type below). However, I

Re: [R] Downloading data from from internet

2009-09-24 Thread Duncan Temple Lang
Thanks for explaining this, Charlie. Just for completeness and to make things a little easier, the XML package has a function named readHTMLTable() and you can call it with a URL and it will attempt to read all the tables in the page. tbls =

Re: [R] dotchart to barplots

2009-09-24 Thread Nair, Murlidharan T
I decided to use your tip and plot the bars using different shades of grey as follows barplot(t(as.matrix(intersect.data[,2:5])),col=c('black','grey40','darkgrey','white'), beside = T, horiz = T, legend.text = names(intersect.data)[-1], axes=TRUE, border=TRUE,plot.grid=F,cex=2,

[R] basic cubic spline smoothing (resending because not sure about pending)

2009-09-24 Thread Hicham Mouline
Hello, I come from a non statistics background, but R is available to me, and I needed to test an implementation of smoothing spline that I have written in c++, so I would like to match the results with R (for my unit tests). I am following Smoothing Splines, D.G. Pollock (available

Re: [R] graphics mailing list?

2009-09-24 Thread baptiste.auguie
(Sorry about the double post earlier, googlemail is having hiccups today) 2009/9/24 Romain Francois romain.franc...@dbmail.com: Why just grid ? why not a list for all kind of graphics ? I figured that a good share of the traffic on r-help might be considered graphics-related, while I was aiming

[R] RODBC problem

2009-09-24 Thread Data Analytics Corp.
Hi, I'm attempting to use the RODBC package on Windows Vista to import an excel spreadsheet. The spreadsheet has three worksheets the last of which is blank. Following an example in Phil Spector's book (p. 34), after creating a connection named con I did the following: con RODBC

[R] basic cubic spline smoothing

2009-09-24 Thread hm567
Hello, I come from a non statistics background, but R is available to me, and I needed to test an implementation of smoothing spline that I have written in c++, so I would like to match the results with R (for my unit tests) I am following http://www.nabble.com/file/p25569553/SPLINES.PDF

[R] lmer() vs. fixed effects regression

2009-09-24 Thread jjh21
Hi, First, some quick terminology I am using: Fixed effects = model with unit dummy variables Random effects = model without unit dummy variables, integrating unit-level variance out of likelihood I am confused about the difference between the multilevel modeling framework of lmer() and a fixed

[R] more strange behavior of Revolution R 1.3.0

2009-09-24 Thread Jason Liao
It runs more than twice as slowly using 8 core than using a single core in inverting large matrix. Tested on 8 core Windows XP 64 machine. n = 1000 n.simu = 100 func1 = function() + { + x = rnorm(n*n) + dim(x)=c(n,n) + y = solve(x) + } setMKLthreads(1)

Re: [R] scaled Schoenfeld residuals

2009-09-24 Thread Greg Dropkin
hi thanks, I see that cox.zph is plotting and smoothing the scaled Schoenfeld residuals as generated by R, but since the term is already in the literature with a formula, maybe the help should clarify the offset. I found it confusing anyway. thanks for help greg Thomas Lumley tlumley at

[R] Access to conditioning variables (lattice)

2009-09-24 Thread Martin D. Lepage
[using R version 2.8.1 (2008-12-22)] Hello, I'm trying to access the conditioning variables of an xyplot within a 'panel' function but I have not been able to figure out how to do so. Here is a simple example that describes what I wish to do (the problem lies with the commented line): dataset -

[R] multinormial runs tests?

2009-09-24 Thread liujb
Dear R users, I would like to test the randomness in a series of N values (N=2). I know that runs.test works for dichotomous factor only: x - rep(c(1,2), 50) runs.test(factor(x)) However it doesn't work for series that can take any N values (N2): x - rep(c(1,2,5,4),50) runs.test(factor(x))

[R] how to make a function recognize the name of an object/vector given as argument

2009-09-24 Thread Wolfgang Raffelsberger
Dear guRus, I'd like to learn how to make a function recognize the name of an object/vector given as argument If I have : testFun - function(x,y) plot(x,y, main=paste(plot of,names(x),and,names(y)) ) # this just a simple example ... a1 - 5:8 b1 - 9:6 testFun(a1,b1) # Returns the plot,

Re: [R] how to make a function recognize the name of an object/vector given as argument

2009-09-24 Thread baptiste auguie
Try this, testFun - function(x,y) plot(x,y, main=paste(plot of,deparse(substitute(x)),and, deparse(substitute(y))) ) a1 - 5:8 b1 - 9:6 testFun(a1,b1) ?deparse HTH, baptiste 2009/9/24 Wolfgang Raffelsberger wr...@igbmc.fr: Dear guRus, I'd like to learn how to make a function recognize

Re: [R] more strange behavior of Revolution R 1.3.0

2009-09-24 Thread Uwe Ligges
Please discuss with REvolution support. Most of us do not have a version of REvolution R. Uwe Ligges Jason Liao wrote: It runs more than twice as slowly using 8 core than using a single core in inverting large matrix. Tested on 8 core Windows XP 64 machine. n = 1000 n.simu = 100

Re: [R] Problem with xtabs(), exclude=NULL, and counting NA's

2009-09-24 Thread Webb Sprague
Also see addNA. Works great. Sometimes R drives me crazy, but Hadley, you make it much easier for me That is nice. The addNA function does not exactly jump off the page for the (too) casual reader. In the context of the OP's original problem, these lines of code are illustrative: Here

Re: [R] Post-Hoc tests for Friedman Test?

2009-09-24 Thread David Winsemius
On Sep 20, 2009, at 9:35 PM, David Winsemius wrote: On Sep 20, 2009, at 9:05 PM, j...@terraspark.com wrote: Hi there all, This is my first post to the list and I'll first say a few things: - R is great! - The archives of this list have helped me solve all of my problems/ questions so far

Re: [R] Access to conditioning variables (lattice)

2009-09-24 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Martin D. Lepage Sent: Thursday, September 24, 2009 7:38 AM To: r-help@r-project.org Subject: [R] Access to conditioning variables (lattice) [using R version 2.8.1

Re: [R] RODBC problem

2009-09-24 Thread Greg Snow
Try it without the '$' in the table name, that has worked for me in the past. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-

Re: [R] RODBC problem

2009-09-24 Thread Schalk Heunis
Walt I get the same message using R2.9.2 on Vista. Using sqlFetch(con,'Sheet1') seems to however. HTH Schalk Heunis On Thu, Sep 24, 2009 at 6:23 PM, Data Analytics Corp. dataanalyt...@earthlink.net wrote: Hi, I'm attempting to use the RODBC package on Windows Vista to import an excel

[R] October-November R /S Courses: Nationwide (1) R/S+ Fundamentals and (2) R/S-Plus Advanced Programming. in San Francisco, New York City, Boston, Washington DC, Seattle and Salt Lake City

2009-09-24 Thread Sue Turner
XLSolutions Corporation is proud to announce our October-November R /S course schedule in New York City, San Francisco, Boston, Washington DC, Seattle and Salt Lake City. Taught by top R/S+ gurus! http://www.xlsolutions-corp.com/rplus.asp (1-a) R/S-PLUS: An Introduction to R and S

Re: [R] RODBC problem

2009-09-24 Thread Data Analytics Corp.
Schalk, This worked. Thanks for the hint. Walt Schalk Heunis wrote: Walt I get the same message using R2.9.2 on Vista. Using sqlFetch(con,'Sheet1') seems to however. HTH Schalk Heunis On Thu, Sep 24, 2009 at 6:23 PM, Data Analytics Corp. dataanalyt...@earthlink.net wrote: Hi, I'm

[R] Does anybody know how to connect to KDB from within R?

2009-09-24 Thread Michael
Please give me some pointers... Thanks a lot! __ 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] multinormial runs tests?

2009-09-24 Thread Greg Snow
You can do this by simulation: Generate data from a multinomial of the same length as your data (the sample function can help) using either theoretical or observed probabilities. Measure the length of the longest run, or the number of runs (the rle function can help). Repeat this a bunch of

[R] Time Series Format Error

2009-09-24 Thread Steve_Friedman
I have rec'd the following error: P34annual - read.table(A:\\Data\\Output\\Sparrow\\Hydro_Data\\P34_Annual.txt, header=TRUE, sep=,, stringsAsFactors= FALSE, skip=1) P34annual$GS - rep(1.86, dim(P34annual)[1]) P34annual$Depth - as.numeric(P34annual$P34_stage) - as.numeric(P34annual$GS)

[R] panel.text question

2009-09-24 Thread Osman Al-Radi
Dear R-help, I would like to add text to each of four panels in a plot generated by xyplot in lattice library. A sample code is given below, the plot generated has the first label repeated in all panels! How can I get the labels to be different in each panel? library(lattice) x - rnorm(400) y -

[R] error in amer function

2009-09-24 Thread Marilia malaria
Dear all, I am trying to reproduce the exemple in the vignette Using lme4 to fit Generalized Additive Mixed Models with my dataset. But... mod - amer(pasvig ~ -1 + harvf + tp(dias,by=harvf) + (1 | pac), data=exemplo) Erro em if (from == to) rep.int(from, length.out) else as.vector(c(from,

[R] multicomp plotting

2009-09-24 Thread Nair, Murlidharan T
I am trying to plot my multiple comparison data. Can anyone give me some input of the error I am getting. The data and code is appended below. Thanks ../Murli library(multcomp) sig.data-structure(list(X = 1:63, Cell.lines = structure(c(1L, 6L, 13L, 25L, 33L, 42L, 2L, 7L, 14L, 26L, 34L,

Re: [R] panel.text question

2009-09-24 Thread Henrique Dallazuanna
Try this: xyplot(y ~ x | a, panel=function(x, y, subscripts, ...){ panel.loess(x, y) panel.text(0, 2, label=c('best','better','bad','worst')[tail(subscripts, 1)/100]) }) On Thu, Sep 24, 2009 at 2:45 PM, Osman Al-Radi osman.al.r...@gmail.com wrote: Dear R-help, I would like

[R] Color of the plot which correspond to the group of the observations

2009-09-24 Thread FMH
Dear All,   Let: dp: depth of the river tp: temperature with respect to depth These pair of observations are in 3 different groups i.e: Obs. 1,3,5,7 from the first group Obs. 2,4 and 10 from second group Obs 6,8 and 9 from third group. We can have a simple scatter plot, between depth as y-axis

Re: [R] more strange behavior of Revolution R 1.3.0

2009-09-24 Thread David M Smith
The best place for questions specific to REvolution R is the REvolution forums: http://forums.revolution-computing.com/ (Note: due to anti-spam moderation, it may take a little while for your post to appear.) In this particular case, it looks to me like you're getting a significant speedup after

Re: [R] Color of the plot which correspond to the group of the observations

2009-09-24 Thread Richard M. Heiberger
It is easier in lattice dp - c(1,4,3,2,5,7,9,8,9,2) tp - 1:10 gg - rep(1:3, c(3,3,4)) ddff - data.frame(dp=dp, tp=tp, gg=gg) xyplot(dp ~ tp, groups=gg, data=ddff) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Color of the plot which correspond to the group of the observations

2009-09-24 Thread baptiste auguie
Try these three options, dp - c(1,4,3,2,5,7,9,8,9,2) tp - 1:10 group - factor(c(1, 2, 1, 2, 1, 3, 1, 3, 3, 2), label=letters[1:3]) plot(tp,dp, type= 'p', col = group) d - data.frame(dp=dp, tp=tp, group=group) library(lattice) xyplot(dp~tp, data=d, groups=group, auto.key=TRUE)

[R] Non-parametric test for location with two unpaired sets of data measured on ordinal scale.

2009-09-24 Thread John Sorkin
Please forgive a stats question. I have to sets of data (unpaired) measured on an ordinal scale. I want to test to see if the two sets are different (i.e. do they have the same location): set1: 1,3,2,2,4,3,3,2,2 set: 4,4,4,3,3,5,4,4 What is the most appropriate non-parametric test to test

[R] col headers in read.table()

2009-09-24 Thread Tim Smith
Hi, I was trying to read in a file test.txt, which has the following data: norm normnormclass class class a 1 2 3 4 5 6 b 3 4 5 6 7 8 c 5 6 7 8 9 10 in my R code, I do the

  1   2   >