Re: [R] How to add specific column to data.set?

2012-04-18 Thread phillip03
Wow it works :) Thank you SO much!! I am very new at R and was thinking if you would explain what these to codes do: countries-data.frame(country1,country2,stringsAsFactors=FALSE) # I know this i a vector with both my county lists but what does stringsAsFacors= FALSE do ?. What if I wantede a

[R] Help in Anderson-Darling Normality test

2012-04-18 Thread arunkumar1111
Hi I'm using the Anderson Darling Normality test in my modelling. I'm finding the Normality test for residuals. if the values of residuals are very high the p-value coming out is infinity. how to interpret this. or is there any means of calculating the normality test - Thanks in Advance

Re: [R] How to add specific column to data.set?

2012-04-18 Thread R. Michael Weylandt
I'll unpack it bit by bit: stringsAsFactors = FALSE is a command to tell R how to construct the data frame: this doesn't apply to you because you already have a data frame, but I need it to set up my examples. By default, when you give R data that looks like strings/labels, it wants to convert

Re: [R] parallel processing with multiple directories

2012-04-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/04/12 20:06, David Schaefer wrote: Hello, I would like to run some code in parallel with each cluster reading/writing to a different working directory. I've tried the following code without success. The error I get is: Error in

[R] error estimating parameters with mle2

2012-04-18 Thread Joachim Audenaert
Hi all, When I try to estimate the functional response of the Rogers type I equation (for the mle2 you need the package bbmle): RogersIbinom - function(N0,attackR2_B,u_B) {attackR2_B+u_B*N0} RogersI_B -

[R] Error while generating latex table from sweave and R?

2012-04-18 Thread Manish Gupta
Hi , I am generating one table without using latex. for (i in 1:LCol3) { df - data.frame(matrix(ncol = 6, nrow = 0)) datavec-c(formatfile[formatfile[,3]==Col3[i],-3]) df-rbind(df,datavec) cat(Col3[i],\n) cat(\\begin{table},\n) cat(\\begin{tabular}{|l|l|l|},\n) cat(\\hline,\n)

[R] polar.plot add argument

2012-04-18 Thread Etienne RIFA
Hello I try to create a polar.plot in order to represent some paths. I have one more information: the signal quality. I created classes and I used the argument add to superimpose my different signal levels. the result: http://i180.photobucket.com/albums/x82/zetiem/21.png Normally, the hotter

[R] Re : polar.plot add argument

2012-04-18 Thread Pascal Oettli
Hi, Without data or script... Regards, Pascal - Mail original - De : Etienne RIFA etienne.r...@gmail.com À : r-help@r-project.org Cc : Envoyé le : Mercredi 18 avril 2012 16h32 Objet : [R] polar.plot add argument Hello I try to create a polar.plot in order to represent some paths. I

[R] simplify shapefile and save output

2012-04-18 Thread jm8360
I have several large shapefiles that I need to use to draw a map. I want to simplify the files and then save the output so that I can use them again. The methods that I have tried do not allow me to save the simplified output as a shapefile. I have tried: thinnedSpatialPoly in the package

Re: [R] correlation matrix between data from different files

2012-04-18 Thread jeff6868
I improved yesterday a bit your script (mostly according to station numbers for the automatization). Here's the final version. thanks again! filenames - list.files(pattern=\\_2008_reconstruit.csv$) Sensors - paste(capteur_, 1:4, sep=) Stations -substr(filenames,1,5) nsensors - length(Sensors)

Re: [R] packages install dependencies

2012-04-18 Thread Uwe Ligges
On 18.04.2012 10:48, mail.bioi...@fr.netgrs.com wrote: Hi I created a directory which contains just the two packages marginalmodelplots_0.4.2.tar.gz and locfit_1.5-7.tar.gz called test I launched the command write_PACKAGES as follows write_PACKAGES(/home/bioadm/install/R_packages/test/,

[R] Add covariate in nlme?

2012-04-18 Thread hwouters
Hi R-experts, I have a problem using nlme. I use the following code to group my data: Parameterg - groupedData( result ~ time | Batch, data = Batchdata, labels = list( x = Time, y = analysis) ) and then uses the nlme function to fit a nonlinear mixed model

[R] [R-pkgs] new package: hydroPSO 0.1-54-1

2012-04-18 Thread Mauricio Zambrano-Bigiarini
Dear R and hydrological/environmental community, I would like to draw your attention to hydroPSO, a newly developed R package for the calibration/optimisation of (complex) environmental models. hydroPSO implements a state-of-the-art Particle Swarm Optimisation (PSO) algorithm, which is a

[R] problem with mean.labels=TRUE in plotmeans command (gplots)

2012-04-18 Thread Clare Patterson
I have been using plotmeans() from the gplots package to create graphs, and I would like to display the mean values instead of dots on the graphs. I tried adding mean.labels=TRUE to the command, but the graph displays the dot with the mean value overwritten. Has anyone else encountered this

Re: [R] packages install dependencies

2012-04-18 Thread mail.bioinfo
Hi I created a directory which contains just the two packages marginalmodelplots_0.4.2.tar.gz and locfit_1.5-7.tar.gz called test I launched the command write_PACKAGES as follows write_PACKAGES(/home/bioadm/install/R_packages/test/, type =source) As you can see I have now in my directory

Re: [R] polar.plot add argument

2012-04-18 Thread Jim Lemon
On 04/18/2012 05:32 PM, Etienne RIFA wrote: Hello I try to create a polar.plot in order to represent some paths. I have one more information: the signal quality. I created classes and I used the argument add to superimpose my different signal levels. the result:

Re: [R] Error while generating latex table from sweave and R?

2012-04-18 Thread Uwe Ligges
On 18.04.2012 09:43, Manish Gupta wrote: Hi , I am generating one table without using latex. for (i in 1:LCol3) { df- data.frame(matrix(ncol = 6, nrow = 0)) datavec-c(formatfile[formatfile[,3]==Col3[i],-3]) df-rbind(df,datavec) cat(Col3[i],\n) cat(\\begin{table},\n)

Re: [R] Problem accessing .Rdata objects in a loop

2012-04-18 Thread francy
Thank you both for your answers. Sorry if I haven't explained myself well, Michael, that is what I was looking for. Using get(n) works, thank you. I wish I could have used saveRDS and readRDS, but it was not my saved object… In any case thanks again. 2012/4/17 Michael Weylandt [via R]

[R] Installing texlive dependencies

2012-04-18 Thread Petar Milin
Hello ALL! I am running Fedora 16 x86_64. Due to some dubious problems with the TeXLive (2007, which is a default), I removed it. That removed R as well, and some other dependent packages. Then, I installed TeXLive 2011 from CTAN. However, when I wanted to install R, from Fedora's repositories, it

[R] interpolation issue

2012-04-18 Thread uday
This moment I got stuck with one interpolation issue the sample data which I have is as follows pre1 - c(10.34615 , 52.02116, 146.17357, 243.28644, 347.41504, 431.67105, 521.42712, 629.00446 ,729.95941,827.86279, 921.55078, 956.6) pre2 - c( 983.4477692,

Re: [R] packages install dependencies

2012-04-18 Thread mail.bioinfo
Hi Uwe I tried install.packages(marginalmodelplots, dependencies=TRUE, contriburl=/home/bioadm/install/R_packages/test) But I got always the same error install.packages(marginalmodelplots, dependencies=TRUE, contriburl=/home/bioadm/install/R_packages/test/) Warning: unable to access index

Re: [R] R - fault creating a 3D and contour graph (SIGABRT)

2012-04-18 Thread Duncan Murdoch
On 12-04-18 4:12 AM, Tomas Bayer wrote: Hello, when I tried to create 3D graph from attached file (at first: columns 1, 2, and 3 (longitude, latitude, altitude), then columns 1, 2 and 4 , then the same for column 5 etc) using Akima library for 3D interpolation (the data are neither equidistant

Re: [R] Add covariate in nlme?

2012-04-18 Thread Ben Bolker
hwouters heidiwout at gmail.com writes: Hi R-experts, I have a problem using nlme. I use the following code to group my data: Parameterg - groupedData( result ~ time | Batch, data = Batchdata, labels = list( x = Time, y = analysis) ) While

Re: [R] error estimating parameters with mle2

2012-04-18 Thread Ben Bolker
Joachim Audenaert Joachim.Audenaert at pcsierteelt.be writes: When I try to estimate the functional response of the Rogers type I equation (for the mle2 you need the package bbmle): RogersIbinom - function(N0,attackR2_B,u_B) {attackR2_B+u_B*N0} RogersI_B -

Re: [R] Test-Predict R survival analysis

2012-04-18 Thread Terry Therneau
On 04/18/2012 05:00 AM, r-help-requ...@r-project.org wrote: Hi, I'm trying to use the R Survival analysis on a windows 7 system. The input data format is described at the end of this mail. 1/ I tried to perform a survival analysis including stratified variables using the following formula.

Re: [R] Installing texlive dependencies

2012-04-18 Thread Randy Johnson
I can't make any guaranties, but placing a symbolic link at /usr/share/texmf, pointing at /usr/local/texlive/2011 might do the trick. It's a bit of a hack, but that often works for me. Best, Randy On Apr 18, 2012, at 7:31 AM, Petar Milin wrote: Hello ALL! I am running Fedora 16 x86_64. Due

Re: [R] random effects using lmer

2012-04-18 Thread Ben Bolker
HughSt hughsturrock at hotmail.com writes: I am trying to run a logistic regression to look at the risk of malaria infection in individuals. I want to account for intra household correlation and so want to include a household level random effect. I have been using the lmer command in lme4

Re: [R] packages install dependencies

2012-04-18 Thread Uwe Ligges
On 18.04.2012 14:01, mail.bioi...@fr.netgrs.com wrote: Hi Uwe I tried install.packages(marginalmodelplots, dependencies=TRUE, contriburl=/home/bioadm/install/R_packages/test) Whoops, this was untested an it turns out you need: contriburl=file:/home/bioadm/install/R_packages/test reaing

Re: [R] Installing texlive dependencies

2012-04-18 Thread Marc Schwartz
On Apr 18, 2012, at 6:31 AM, Petar Milin wrote: Hello ALL! I am running Fedora 16 x86_64. Due to some dubious problems with the TeXLive (2007, which is a default), I removed it. That removed R as well, and some other dependent packages. Then, I installed TeXLive 2011 from CTAN. However, when

Re: [R] interpolation issue

2012-04-18 Thread Petr Savicky
On Wed, Apr 18, 2012 at 03:55:07AM -0700, uday wrote: This moment I got stuck with one interpolation issue the sample data which I have is as follows pre1 - c(10.34615 , 52.02116, 146.17357, 243.28644, 347.41504, 431.67105, 521.42712, 629.00446 ,729.95941,

Re: [R] Installing texlive dependencies

2012-04-18 Thread Petar Milin
Thanks very much! However, I tried with that (ln -s /usr/local/texlive/2011 /usr/share/texmf) without luck. yum is still asking for a list of dependencies, including several texlive files. All the best, Petar On Wed, 2012-04-18 at 08:58 -0400, Randy Johnson wrote: I can't make any guaranties,

Re: [R] introducing R to high school students

2012-04-18 Thread Christopher W. Ryan
Thanks all for the excellent thought-provoking comments. I want to clarify that these students are, for good or for ill, already doing all these analytical and graphical things for their projects. They are doing them with Excel and SPSS. One of my goals would be to teach them how they can be done

Re: [R] Kaplan Meier analysis: 95% CI wider in R than in SAS

2012-04-18 Thread Paul Miller
Thanks for the clarification Dr. Therneau. Until I learn more about this I can at least remember that plain is bad. Thanks, Paul --- On Mon, 4/16/12, Terry Therneau thern...@mayo.edu wrote: From: Terry Therneau thern...@mayo.edu Subject: Re: Kaplan Meier analysis: 95% CI wider in R than in

Re: [R] introducing R to high school students

2012-04-18 Thread Steve_Friedman
Christopher, I originally thought about writing off list to avoid a plethora of babble. However here goes. I don't see any reason why good students can 't learn the fundamentals of R. It has lots of advance methods that perhaps are too complex to handle for younger - less experienced people.

Re: [R] introducing R to high school students

2012-04-18 Thread Tyler Rinker
Indrajit, As a former math teacher I understand your concerns wholly.  My perspective is that this must be approached with caution so you don't miss out on the important learning but I think with proper guidance and scaffolding this could be an amazing tool.  We already using the graphing 

[R] Displaying data in Trellis

2012-04-18 Thread slavrenz
This is a question relating to the Trellis function in R. I have a set of socioeconomic data that I would like to display with the xyplot() function for several states. I will have a total of 6 plots, with the y-variable as Age Group, and the x-variable as Median Income. Suitability of the plots

Re: [R] packages install dependencies

2012-04-18 Thread mail.bioinfo
Hi Uwe It works modifying a little bit your command instead of file:=/home/... I used file:///home/... install.packages(marginalmodelplots, dependencies=TRUE, contriburl=file:///home/bioadm/install/R_packages/test/) Thanks for your time and your patience Regards Joël -Message

[R] problem in tk_choose.files

2012-04-18 Thread julio cesar oliveira
Dear list, I can't use the choose.files for list the 2,000 files in directory. # list files names - (tk_choose.files(default = , caption = Select the files , +multi = TRUE, filters = Filt, +index = 1)) names character(0) # names is empty ERROR

[R] Help with creating conditional categorical variables in R

2012-04-18 Thread Dwaipayan Dasgupta
Hi, I am stuck with creating a conditional categorical variable in R If my dataframe data_2 has 3 variables A,B,CI want to create variable D which would be something like : data_2$D - ifelse(data_2$A data_2$B promotion_ind ==N,1,0), this throws up an error In

Re: [R] simple time series plot

2012-04-18 Thread phibo
Thanks for your reply! As I write the script to export the data from the database myself, I'm free to sort the data (almost) at will. I can either export to CSV in the form of sensor1 timestamp1, reading1, timestamp2, reading2, timestamp2, reading2... sensor2 timestamp1, reading1, timestamp2,

Re: [R] interpolation issue

2012-04-18 Thread uday
hi Petr , Thanks for replay and sorry for typo mistake approx(pres, sci.pre) its nothing but approx(pre2, pre1). so for more simplicity x - c(10.34615 , 52.02116, 146.17357, 243.28644, 347.41504, 431.67105, 521.42712, 629.00446 ,729.95941, 827.86279, 921.55078, 956.6) y - c(

Re: [R] simple time series plot

2012-04-18 Thread R. Michael Weylandt
The preferred format for time series will be something like this: Sensor1Sensor2 Sensor3 T1 Read1_1 Read2_1 Read3_1 T2 Read1_2 Read2_2 Read3_2 T3 Read1_3 Read2_3 Read3_3 if you can get that. CSV separations are nice but not as essential as the columnar organization. (It's

Re: [R] interpolation issue

2012-04-18 Thread R. Michael Weylandt
Your problem is that length(x) != length(y) approx uses linear interpolation but there's no way to make sense of that if you can't match up the x and y coordinates -- and you can't match up the x and y coordinates if there aren't the same number of them. Michael On Wed, Apr 18, 2012 at 10:15

Re: [R] Help with creating conditional categorical variables in R

2012-04-18 Thread R. Michael Weylandt
Your problem is that columns A B contain something that can't be ordered. (Likely factor (=categorical) data like Male / Female rather than numeric like 10 and 5) Use str(data_2) to see what classes your data are -- they sometimes get converted in unexpected ways if you aren't careful in setting

[R] Multidimensional Array: local averaging without knowing number of dimensions

2012-04-18 Thread Sebastian Schubert
Hi, I want to access and modify a multi dimensional array but without knowing the exact number of dimensions. Basically. I want something like that for every i (except boundaries of course): field[i, ...] - (field[i, ...] + field[i+1, ...] + field[i-1, ...])/3 In principle, ... should just

[R] normal distribution assumption for multi-level modelling

2012-04-18 Thread Cecile De Cat
Hello, I'm analysing reaction time data from a linguistic experiment (a variant of a lexical decision task). To ascertain that the data was normally distributed, I used *shapiro.test *for each participant (see commands below), but only one out of 21 returns a p value above p.0 05. f =

Re: [R] Displaying data in Trellis

2012-04-18 Thread slavrenz
By the way, as I've been reading through some other posts on here, let me clarify that this isn't for a homework assignment or anything. This is something I am working on as part of my dissertation. -- View this message in context:

[R] Text mining: Narrowing a field of 27, 855 predictors using semi-partial correlations or some other means

2012-04-18 Thread Paul Miller
Hello Everyone, Trying to learn a little bit about data mining. I'm working on a text mining project that will attempt to predict whether cancer patients got a particular type of genetic testing. A subsequent stage then will be aimed at predicting what the results of that testing were.   I've

Re: [R] Support for R in highlight.js

2012-04-18 Thread jjallaire
Hi Ivan, We are in the process of creating an R mode for highlight.js -- will send you a pull request as soon as its ready. Cheers, J.J. Allaire j...@rstudio.org -- View this message in context: http://r.789695.n4.nabble.com/Support-for-R-in-highlight-js-tp4551547p4568141.html Sent from the

Re: [R] simple time series plot

2012-04-18 Thread phibo
Hi Michael, that's exactly the problem. The format for time series you suggest requires to have a reading from every timestamp of every sensor. But that is not the case at all, unfortunately :-( It might well be in my case, that one sensor reports 1000 readings during one day while the other

Re: [R] Displaying data in Trellis

2012-04-18 Thread ilai
On Wed, Apr 18, 2012 at 8:45 AM, slavrenz stevelavr...@hotmail.com wrote: I would like to display with the xyplot() function for several states. I will have a total of 6 plots, I need to plot the points of one of the states in a different color than all the rest, such that they can be more

Re: [R] simple time series plot

2012-04-18 Thread William Dunlap
Try recording the data as a rectangle with 3 entries in each row timestamp, sensor_id, sensor_reading You can read this into an R data.frame, sensorData, with a call to read.csv then use z - split(sensorData, sensorData$sensor_id) to make a list of data.frames, one for each sensor, that you

Re: [R] introducing R to high school students

2012-04-18 Thread Jeff Newmiller
I think that mostly avoiding the statistics and matrix capabilities is wise. You might want to (re-)read Burns' article on Spreadsheet Addiction for help in justifying the effort required to learn R. In that vein, there is a classic experiment where a small ball is rolled down an inclined pane

[R] quarter end dates between two date strings

2012-04-18 Thread Ben quant
Hello, I have two date strings, say 1972-06-30 and 2012-01-31, and I'd like to get every quarter period end date between those dates? Does anyone know how to do this? Speed is important... Here is a small sample: Two dates: 2007-01-31 2012-01-31 And I'd like to get this: [1] 2007-03-31

Re: [R] writing spdiags function for R

2012-04-18 Thread Moreno I. Coco
Hi Ben, A couple of quick comments: the semicolons at the end of each line are unnecessary (they're harmless, but considered bad style -- most common in code of C and MATLAB coders yes, I know, just forgot to clean it up after translating :) You don't need to source(getband.R) inside

Re: [R] introducing R to high school students

2012-04-18 Thread David Winsemius
On Apr 18, 2012, at 12:31 PM, Jeff Newmiller wrote: I think that mostly avoiding the statistics and matrix capabilities is wise. You might want to (re-)read Burns' article on Spreadsheet Addiction for help in justifying the effort required to learn R. In that vein, there is a classic

[R] Amelia error

2012-04-18 Thread Gaurav Sood
Hi, Encountering the following error using Amelia - Error in if (sum(non.vary == 0)) { : argument is not interpretable as logical In addition: Warning message: In FUN(X[[34L]], ...) : NAs introduced by coercion Seems like a bug. __

Re: [R] introducing R to high school students

2012-04-18 Thread Hadley Wickham
Now I have to put my money where my mouth is. I've offered to visit a high school and introduce R to some fairly advanced students participating in a longitudinal 3-year science research class. I anticipate keeping things very simple: --objects and the fact that there is stuff inside them.

Re: [R] Amelia error

2012-04-18 Thread Sarah Goslee
Do you mean the Amelia package? Or a function named Amelia()? What is your OS and version of R and package? What are the commands you are using? What do your data look like? Can you provide a reproducible example? Did you read the posting guide? Your problem doesn't seem like a bug rather

Re: [R] parallel processing with multiple directories

2012-04-18 Thread David Schaefer
Hi Rainier, Thanks for your suggestions. I should have been more specific, I am using multiple cores on a Mac Pro running Snow Leopard. I can see where that makes a difference. --David On 4/18/12 12:13 AM, Rainer M Krug r.m.k...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash:

Re: [R] quarter end dates between two date strings

2012-04-18 Thread Marc Schwartz
On Apr 18, 2012, at 11:58 AM, Ben quant wrote: Hello, I have two date strings, say 1972-06-30 and 2012-01-31, and I'd like to get every quarter period end date between those dates? Does anyone know how to do this? Speed is important... Here is a small sample: Two dates: 2007-01-31

Re: [R] introducing R to high school students

2012-04-18 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Hadley Wickham Sent: Wednesday, April 18, 2012 10:37 AM To: Christopher W Ryan Cc: R-help Subject: Re: [R] introducing R to high school students Now I have to put my money

Re: [R] Amelia error

2012-04-18 Thread Gaurav Sood
Using: Amelia::amelia R version: 2.15 OS: Windows 7 Enterprise data = National Election Studies (cross-sectional); mostly ordinal variables, some nominal summary(ad04) insurance jobs services sswomen Min. :1.000 Min. :1.000 Min. :1.000

Re: [R] Amelia error

2012-04-18 Thread David Freedman
I've had a little experience using the package, Amelia. Are you sure that your nominal variables - race, south, etc - are in your ad04 data frame ? David Freedman -- View this message in context: http://r.789695.n4.nabble.com/Amelia-error-tp4568455p4568600.html Sent from the R help mailing

Re: [R] Amelia error

2012-04-18 Thread Sarah Goslee
Hi, On Wed, Apr 18, 2012 at 2:18 PM, Gaurav Sood gsoo...@gmail.com wrote: Using: Amelia::amelia R version: 2.15 OS: Windows 7 Enterprise data = National Election Studies (cross-sectional); mostly ordinal variables, some nominal summary(ad04)   insurance          jobs          services  

Re: [R] Amelia error

2012-04-18 Thread Peter Ehlers
On 2012-04-18 11:18, Gaurav Sood wrote: Using: Amelia::amelia R version: 2.15 OS: Windows 7 Enterprise data = National Election Studies (cross-sectional); mostly ordinal variables, some nominal summary(ad04) insurance jobs services sswomen Min.

Re: [R] Amelia error

2012-04-18 Thread Gaurav Sood
Sarah - I have all the vars.. they all look sensible. I have been able to trace the problem to NAs in the nominal variable, which is a bit strange. The error that the program spits out is a class logical equating error in presence of NAs etc. and hence was my hunch that it was a bug. On Wed,

Re: [R] Amelia error

2012-04-18 Thread Gaurav Sood
Easily fixed, Peter - str(ad04) 'data.frame': 1195 obs. of 15 variables: $ V040001 : num 1 2 3 4 5 6 7 8 9 10 ... $ insurance: num 7 2 4 1 5 2 7 1 5 5 ... $ jobs : num 7 3 4 1 6 5 7 5 4 7 ... $ services : num 5 2 5 1 5 2 7 1 4 7 ... $ ss : num 2 2 2 1 2 1 2 1 1 3 ... $

Re: [R] Error with Rcmd check library --as-cran

2012-04-18 Thread Duncan Murdoch
On 12-04-17 11:50 PM, David Bapst wrote: Hi all- Henrik, packageDescription informs me that I have Matrix version 1.0-6, which is the newest version on CRAN. The --as-cran check in R 2.15.0 is a little bit too aggressive: this was a spurious error. If your package depends on another

Re: [R] quarter end dates between two date strings

2012-04-18 Thread David Winsemius
On Apr 18, 2012, at 2:05 PM, Marc Schwartz wrote: On Apr 18, 2012, at 11:58 AM, Ben quant wrote: Hello, I have two date strings, say 1972-06-30 and 2012-01-31, and I'd like to get every quarter period end date between those dates? Does anyone know how to do this? Speed is important...

Re: [R] normal distribution assumption for multi-level modelling

2012-04-18 Thread Bert Gunter
Cecile: On Wed, Apr 18, 2012 at 8:21 AM, Cecile De Cat c.de...@leeds.ac.uk wrote: Hello, I'm analysing reaction time data from a linguistic experiment (a variant of a lexical decision task).   To ascertain that the data was normally distributed, I used *shapiro.test *for each participant

Re: [R] quarter end dates between two date strings

2012-04-18 Thread Marc Schwartz
On Apr 18, 2012, at 1:49 PM, David Winsemius wrote: On Apr 18, 2012, at 2:05 PM, Marc Schwartz wrote: On Apr 18, 2012, at 11:58 AM, Ben quant wrote: Hello, I have two date strings, say 1972-06-30 and 2012-01-31, and I'd like to get every quarter period end date between those dates?

[R] how to plot separate lm ablines on the same xyplot by group

2012-04-18 Thread Louis Plough
Hi, I am trying to use xyplot to plot the relationship between size and day (y~x) by a food factor that has two levels, low and high. I have 3 reps per factor/day. I want the plots from each food treatment on the same axiss, so I used this code: xyplot(Size ~ Day, groups = Food, data =

Re: [R] introducing R to high school students

2012-04-18 Thread Hadley Wickham
If the students are in a science research class, does that mean they have data from their own research that they would want to understand better?  I think that would be much more motivating than anything else. It might depends on the class - most high school science experiments aren't that

Re: [R] how to plot separate lm ablines on the same xyplot by group

2012-04-18 Thread Bert Gunter
Please read ?panel.superpose again and pay attention to the panel.groups argument, where this can be specified. -- Bert On Wed, Apr 18, 2012 at 12:34 PM, Louis Plough lplo...@usc.edu wrote: Hi, I am trying to use xyplot to plot the relationship between size and day (y~x) by a food factor

[R] multi-machine parallel setup?

2012-04-18 Thread ivo welch
Dear R experts: could someone please point me to a page that explains how to set up more than 1 machine for library parallel (which is quickly becoming my favorite!) my dream setup would be a design where I just pass a list of hostnames:user:password to my parallel master, and then start R

[R] install qvalue from biocLite

2012-04-18 Thread liwang
dear list members I tried to install qvalue package from biocLite, and I am confronted with the following error: Tcl/Tk support is not available on this system. I installed the newest version of Tcl/Tk in my system, and then uninstall and install R 2.15.0 again. I did the command line as

[R] Error: X11 fatal IO error: please save work and shut down R when ssh connection broken

2012-04-18 Thread regcl
I ues R on a Linux server running under Screen or Emacs server from a Mac desktop. I use Screen and/or Emacs server so that I can reattach to long running sessions, and this works well except... If X11 server on my desktop is shut down, or my ssh connection is broken, I get this error on the

Re: [R] How to add specific column to data.set?

2012-04-18 Thread phillip03
So the lapply function checks every country pair row for row (in my country1 and country2 column) and send back a true if both countries are EU? How do I get a 1 instead of true and 2 instead of false? You have been a BIG help. I have a WHOLE assignment to get done, so maybe I'll post some more

Re: [R] how to plot separate lm ablines on the same xyplot by group

2012-04-18 Thread Louis Plough
If you could lead me to an example with code, that would help me figure out how to do it for my function On Wed, Apr 18, 2012 at 3:57 PM, Louis Plough lplo...@usc.edu wrote: I read it, but I guess I don't quite understand which arguments to pass panel.groups to get different lm objects based

Re: [R] normal distribution assumption for multi-level modelling

2012-04-18 Thread Ben Bolker
Cecile De Cat c.decat at leeds.ac.uk writes: I'm analysing reaction time data from a linguistic experiment (a variant of a lexical decision task). To ascertain that the data was normally distributed, I used *shapiro.test *for each participant (see commands below), but only one out of 21

[R] comparing linear models

2012-04-18 Thread JesperHybel
I wanted to do an F-test to compare model L2 with L3 assuming heteroskedasticity. The variable KONK2 only has three levels and are for that reason replaced by dummyvariables KONKD1 and KONKD2 in L3. Hence making L4 equivalent to L2. L2-lm(PRMRES ~ factor(NYPR) + KONK2 + OMS + factor(NYPR)*OMS )

Re: [R] General question on the message with non zero exit status

2012-04-18 Thread Chel Hee Lee
Oh... I see!!! I very appreciate for your clear explanation! Thank you, Uwe Ligges. -- View this message in context: http://r.789695.n4.nabble.com/General-question-on-the-message-with-non-zero-exit-status-tp4551438p4568839.html Sent from the R help mailing list archive at Nabble.com.

[R] problem extracting data from a set of list vectors

2012-04-18 Thread Vining, Kelly
Dear useRs, A colleague has sent me several batches of output I need to process, and I'm struggling with the format to the point that I don't even know how to extract a test set to upload here. My apologies, but I think that my issue is straightforward enough (for some of you, not for me!)

[R] Is there a way to find all roots of a polynomial equation in R?

2012-04-18 Thread Michael
Is there a way to find all roots of a polynomial equation? Lets say x^5+a*x^4+b*x^3+c*x^2+d*x+e=0 how to find its all roots? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Is there a way to find all roots of a polynomial equation in R?

2012-04-18 Thread Duncan Murdoch
On 12-04-18 4:14 PM, Michael wrote: Is there a way to find all roots of a polynomial equation? Lets say x^5+a*x^4+b*x^3+c*x^2+d*x+e=0 how to find its all roots? polyroot() should be able to do it, assuming that a,b,c,d and e are numeric or complex values, not just symbols. Duncan

Re: [R] Is there a way to find all roots of a polynomial equation in R?

2012-04-18 Thread Rolf Turner
On 19/04/12 08:14, Michael wrote: Is there a way to find all roots of a polynomial equation? Lets say x^5+a*x^4+b*x^3+c*x^2+d*x+e=0 how to find its all roots? I believe that Galois (or maybe it was Abel) proved that this is *NOT* possible, a couple of centuries ago. However if you are

Re: [R] how to plot separate lm ablines on the same xyplot by group

2012-04-18 Thread Richard M. Heiberger
please look at the ancova function in the HH package. On Wed, Apr 18, 2012 at 3:34 PM, Louis Plough lplo...@usc.edu wrote: Hi, I am trying to use xyplot to plot the relationship between size and day (y~x) by a food factor that has two levels, low and high. I have 3 reps per factor/day. I

Re: [R] problem extracting data from a set of list vectors

2012-04-18 Thread Milan Bouchet-Valat
Le mercredi 18 avril 2012 à 13:13 -0700, Vining, Kelly a écrit : Dear useRs, A colleague has sent me several batches of output I need to process, and I'm struggling with the format to the point that I don't even know how to extract a test set to upload here. My apologies, but I think that

Re: [R] interpolation issue

2012-04-18 Thread Petr Savicky
On Wed, Apr 18, 2012 at 07:15:45AM -0700, uday wrote: hi Petr , Thanks for replay and sorry for typo mistake approx(pres, sci.pre) its nothing but approx(pre2, pre1). so for more simplicity x - c(10.34615 , 52.02116, 146.17357, 243.28644, 347.41504, 431.67105, 521.42712,

Re: [R] how to plot separate lm ablines on the same xyplot by group

2012-04-18 Thread ilai
On Wed, Apr 18, 2012 at 2:07 PM, Louis Plough lplo...@usc.edu wrote: If you could lead me to an example with code, that would help me figure out how to do it for my function The states example in ?xyplot uses groups and subscripts in a panel function I read it, but I guess I don't quite

Re: [R] how to plot separate lm ablines on the same xyplot by group

2012-04-18 Thread Bert Gunter
x - rep(1:10,4) y - runif(40) z - sample(letters[1:4],40,rep=TRUE) grp - sample(LETTERS[1:2],40,rep=TRUE) xyplot(y~x|z, group=grp, panel = panel.superpose, panel.groups = function(...){ panel.xyplot(...) panel.lmline(...) }) Keys (legends), colors, line styles,etc, can all be

Re: [R] problem extracting data from a set of list vectors

2012-04-18 Thread Vining, Kelly
Thanks for your help, Milan, in showing me a way to exhibit the structure of my data. # Again, my data sets are: [1] res.Callus.Explant res.Callus.Regen res.Explant.Regen # Structure is: str(res.Callus.Explant) List of 18 $ name : chr two group comparison $ group1 : chr

Re: [R] problem extracting data from a set of list vectors

2012-04-18 Thread MacQueen, Don
Try this (NOT tested) or something similar: all.comps - ls(pattern=^res) for(i in all.comps) { obj - all.comops[[i]] gene.ids - rownames(obj$counts) x - data.frame(gene.ids = gene.ids, obj$counts, obj$e1, obj$e2, obj$log.fc, obj$p.value, obj$q.value) x -

Re: [R] quarter end dates between two date strings

2012-04-18 Thread Gabor Grothendieck
On Wed, Apr 18, 2012 at 12:58 PM, Ben quant ccqu...@gmail.com wrote: Hello, I have two date strings, say 1972-06-30 and 2012-01-31, and I'd like to get every quarter period end date between those dates? Does anyone know how to do this? Speed is important... Here is a small sample: Two

[R] Numerical integration again

2012-04-18 Thread casperyc
Hi all, Here is an integration function require(pracma) # for 'quadinf' myint=function(j) { quadinf(function(x) (1/(1+exp(-x)))^j*(1-1/(1+exp(-x)))^(k-j)*dnorm(x,mu,casigma),-Inf,Inf) } in any optimization routine. It works fine most of the time but failed with some particular sets of

[R] Pierce's criterion

2012-04-18 Thread Ryan Murphy
Hello all, I would like to rigorously test whether observations in my dataset are outliers. I guess all the main tests in R (Grubbs) impose the assumption of normality. My data is surely not normal, so I would like to use something else. As far as I can tell from wikipedia, Peirce's criterion

[R] ggplot2 stat_density2d issue.

2012-04-18 Thread Dmitriy Lyubimov
Hello, I'd be very grateful for help with some ggplot2's stat_density2d issues. First issue is with data limits. xlim() and ylim() doesn't seem to work; instead, estimates (and plotting) seems to be constrained to range(x), range(y) no matter what i do. The documentation says i can pass in

Re: [R] ggplot2 stat_density2d issue.

2012-04-18 Thread David Winsemius
On Apr 18, 2012, at 6:55 PM, Dmitriy Lyubimov wrote: Hello, I'd be very grateful for help with some ggplot2's stat_density2d issues. First issue is with data limits. xlim() and ylim() doesn't seem to work; instead, estimates (and plotting) seems to be constrained to range(x), range(y) no

Re: [R] Is there a way to find all roots of a polynomial equation in R?

2012-04-18 Thread JesperHybel
Is there a way to find all roots of a polynomial equation? Lets say x^5+a*x^4+b*x^3+c*x^2+d*x+e=0 how to find its all roots? The package rootSolve might proove interesting __ R-help@ mailing list https://stat.ethz.ch/mailman/listinfo/r-help

  1   2   >