Re: [R] Discovery on packages

2009-05-26 Thread Martin Maechler
> "PS" == Phil Spector > on Tue, 26 May 2009 09:25:26 -0700 (PDT) writes: PS> Janna - PS> Another thing that's sometimes useful with a new package PS> is to run the example function, like PS> example(TTR) PS> This will run the examples from the documentation to g

Re: [R] split strings

2009-05-26 Thread Allan Engelhardt
Immaterial, yes, but it is always good to test :) and your solution *is* faster and it is even faster if you can assume byte strings: > strings = sprintf('f:/foo/bar//%s.tif', replicate(1000, paste(sample(letters, 10), collapse=''))) > library(rbenchmark) > benchmark(columns=c('test', 'elapsed

[R] Harmonic Analysis

2009-05-26 Thread mauede
I am looking for a package to perform harmonic analysis with the goal of estimating the period of the dominant high frequency component in some mono-channel signals. I guess there are presumably a number of CRAN packages allowing for such analysis. However, my search with keywords was not succe

[R] Exception from HRESULT: 0x80040013

2009-05-26 Thread chenxiaocong1212
Hallo Everyone, I have a problem getting R DCom to work on a MS Server 2003. I am using Visual Studio 2005 to use some statistical functions from R. I have installed DCOM 1.3.5. but as soon as the statement iR.Init("R") is executed I get the following error: Exception from HRESULT: 0x8004001

[R] Newbie: Using R to analyse Apache logs

2009-05-26 Thread Douglas Twyman
I saw a post (https://stat.ethz.ch/pipermail/r-help/2008-January/153086.html) where you stated you were using R to do some apache log analysis. I was about to embark on such a project . Is it posted anywhere (or could you drop it to me ?) I'm sure you are as busy as I am, if your code is op

[R] Beta Testers Wanted for SPSS Statistics Developer - email addresses

2009-05-26 Thread JKPeck
The email addresses in this message were obscured. If you are interested, please send email to arangel at spss dot com. Regards, Jon Peck jkpeck at gmail dot com. -- Forwarded message -- From: Jon Peck Date: May 26, 3:40 pm Subject: Beta Testers Wanted for SPSS Statistics Dev

Re: [R] Help needed on R output

2009-05-26 Thread Linlin Yan
Did you mean this: > write.table(t, eol=",\n", row.names=FALSE, col.names=FALSE) "", "01001001011011101100", "1001001011010101", "1101110100000011", "000100100101001001011001", "000101101101101001101001",

Re: [R] Finding and removing non-printable ascii characters in a file

2009-05-26 Thread jim holtman
You can use readLines to read the data in and then gsub to remove the characters you don't want and the textConnection to 'read' in the processed data. > x <- readLines("/tempxx.txt") > # show data > x [1] "al;skdjf a;lskdjf s;aldkfj asd;lfkj " "_)(*)(*&*(&^ &*(^%*&^%" [3] "a;lskdfj z,xmcvn -129

[R] Cgee: error: logistic model

2009-05-26 Thread Jenn Yost
Hello, Much like Charlie Wills a year ago, I am trying to run the APE program COMPAR.GEE with a model containing a categorical response variable and a continuous variable. My command code is : compar.gee(costusdata$Syndrome ~ costusdata$Stamen, phy = costustree, family = "binomial")

[R] Finding and removing non-printable ascii characters in a file

2009-05-26 Thread Daniel Bradley
Hi! I'm completely confusing myself attempting to solve this one. Is there a simple way of removing particular ASCII characters from a CSV file using R. Hopefully something simpler and faster than cycling through each individual character and comparing them to a list of characters to remove then

Re: [R] Problem with fractional seconds

2009-05-26 Thread Gabor Grothendieck
POSIXct is intended to represent date/times. You can use format to just show the times but the dates will still be there: > format(Sys.time(), "%H:%M:%S%OS") [1] "18:20:.910" difftime objects can represent times although perhaps not conveniently: > now <- Sys.time() > now - as.POSIXct(cut(n

Re: [R] Problem with fractional seconds

2009-05-26 Thread Seeliger . Curt
Use format, format(myt, "%H:%M:%S%OS") -- Curt Seeliger, Data Ranger Raytheon Information Services - Contractor to ORD seeliger.c...@epa.gov 541/754-4638 > Thanks, that worked. However, is there is way to just get the time > and not have the date added? I assume the date is added since POSIX

Re: [R] Problem with fractional seconds

2009-05-26 Thread Seeliger . Curt
Thanks for beating me to that, Gabor. The %OS format spec isn't in the strptime() docs. How else might we have found this for ourselves? cur r-help-boun...@r-project.org wrote on 05/26/2009 02:59:20 PM: > > as.POSIXct(c("06:00:00.100","06:00:01.231"), format = "%H:%M:%S%OS") > [1] "2009-05-26

Re: [R] Problem with fractional seconds

2009-05-26 Thread Gabor Grothendieck
Its in the second paragraph after the list of % codes. On Tue, May 26, 2009 at 6:11 PM, wrote: > > Thanks for beating me to that, Gabor.  The %OS format spec isn't in the > strptime() docs.  How else might we have found this for ourselves? > > cur > > r-help-boun...@r-project.org wrote on 05/26/

Re: [R] using lsoda() and nls() together

2009-05-26 Thread Thomas Petzoldt
Hi Benoit, your problem is not really a problem of lsoda. The reason of the "crash" is a violation of the statistical assumptions of least squares regression due to dependency of residual variance on x. Due to this, K1 is varied over a very large range of values until numeric overflow occurs.

Re: [R] Problem with fractional seconds

2009-05-26 Thread Tim Clark
Gabor, Thanks, that worked. However, is there is way to just get the time and not have the date added? I assume the date is added since POSIX is based on seconds since 1970. I can't seem to convert the POSIX value to Chron times(), and Chron won't take fractional seconds. Are there other w

Re: [R] Creating multiple graphs based on one variable

2009-05-26 Thread Tim Clark
Stefan, Thanks for the suggestion. Lattice works great. You might also want to check out the ggplot2 package that Luc suggested. They both seem to provide quite a few more options than the basic graphics package in R. Aloha, Tim Tim Clark Department of Zoology University of Hawaii ---

Re: [R] Problem accessing "row number" from subset on a dataframe

2009-05-26 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Jason Rupert > Sent: Tuesday, May 26, 2009 1:55 PM > To: Mark Wardle > Cc: R-help@r-project.org > Subject: Re: [R] Problem accessing "row number" from subset > on a dataframe >

Re: [R] Creating multiple graphs based on one variable

2009-05-26 Thread Tim Clark
Luc, Thanks! I was not aware of that package. It looks a lot easier than what I have been trying to do! Aloha, Tim Tim Clark Department of Zoology University of Hawaii --- On Tue, 5/26/09, Luc Villandre wrote: > From: Luc Villandre > Subject: Re: [R] Creating multiple graphs based on

Re: [R] Problem with fractional seconds

2009-05-26 Thread Gabor Grothendieck
Try this: > as.POSIXct(c("06:00:00.100","06:00:01.231"), format = "%H:%M:%S%OS") [1] "2009-05-26 06:00:00.100 EDT" "2009-05-26 06:00:00.231 EDT" On Tue, May 26, 2009 at 5:52 PM, Tim Clark wrote: > > Dear List, > > I am having problems converting a file with fractional seconds to class > POSIXc

[R] Problem with fractional seconds

2009-05-26 Thread Tim Clark
Dear List, I am having problems converting a file with fractional seconds to class POSIXct. I have set my options to include digits.secs and my format to just time, but my output is the current date with my time lacking the fractions of a second. For example: options(digits.secs=3) t<-c("

[R] Beta Testers Wanted for SPSS Statistics Developer

2009-05-26 Thread Jon Peck
Since SPSS version 16 in 2007, we have had a free plug-in that allows R programs to run within SPSS, getting some or all of the active data and writing results to the SPSS Viewer as plain text or as SPSS pivot tables and R charts.  This can require adding as few as two lines of code to the R progra

Re: [R] Help needed on R output

2009-05-26 Thread jim holtman
If you want to create that output in a file, then create one long string and use 'cat' to output; here is an example with the output to the console: > t <- c( + "", + "01001001011011101100", + "1001001011010101", + "1101110100

[R] Using package "exams" and xtable

2009-05-26 Thread M Berg
Hello, I am trying to use the package "exams" to construct problem sets. I have constructed an exercise which generates a list of integers and asks the student to compute the median. rx is the vector of n numbers >str(rx) num [1:16] 21 9 8 18 4 12 17 2 9 7 ... I want to print out the entire ve

Re: [R] Help needed on R output

2009-05-26 Thread peng chen
Thanks. I am sorry that I did not clearly put my question. I need to output the array like t <- c( + "", + "01001001011011101100", + "1001001011010101", + "1101110100000011", + "000100100101001001011001", + "

Re: [R] Help me...!!!

2009-05-26 Thread Carl Witthoft
From: Doran, Harold Date: Tue, 26 May 2009 14:26:53 -0400 The bad news, as others have indicated, is that this list is not for homework. The good news is that all of this is extremely easy in R!!! > -Original Message- > From: r-help-bounces_at_r-project.org > [mailto:r-help-bounces_a

Re: [R] Problem accessing "row number" from subset on a dataframe

2009-05-26 Thread Mark Wardle
Ok, if you insist [although it's still unclear why you need this level of indirection!] Try ?which e.g. > which(airquality$Month==5) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 > which(airquality$Month==6) [1] 32 33 34 35 36 37 38 39 40 41 4

Re: [R] Problem accessing "row number" from subset on a dataframe

2009-05-26 Thread Bert Gunter
?which e.g.which(airquality$Month == 6) -- Bert Gunter Genentech Noclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jason Rupert Sent: Tuesday, May 26, 2009 1:55 PM To: Mark Wardle Cc: R-help@r-project.org Subje

Re: [R] (OT) Does pearson correlation assume bivariate normality of the data?

2009-05-26 Thread Thomas Lumley
This is the sort of problem (another related one is the assumptions of the t-test) that attracts a lot of relatively inefficient argument. Some basic points 1. If random variables X and Y are uncorrelated (and have finite moments, but that's a purely technical issue), the distribution of the

Re: [R] optim() question

2009-05-26 Thread Ravi Varadhan
Stephen, No. Currently, AFAIK, there is no such switching algorithm for optimization in R. John Nash and I are working on a package for integrating various optimization tools (for smooth, box-constrained optimization) in R. This will have a function that can run through multiple algorithms.

Re: [R] Sample size calculation proportions with EpiR: Discrepancy to other calculators

2009-05-26 Thread Thomas Lumley
On Tue, 26 May 2009, Chuck Cleland wrote: On 5/26/2009 2:53 AM, Karl Knoblick wrote: Hallo! I have done a sample size calculation for proportions with EpiR. The input is: treatment group rate p=0.65 control group rate p=0.50 significance level 0.95 power 0.80 two-sided ration group 1 and 2: 1.

Re: [R] Problem accessing "row number" from subset on a dataframe

2009-05-26 Thread Jason Rupert
Mark, I really apprecaite your response and continue to be amazed by the responsiveness and support on the R forums. And, well actually, I would like to get the "row number"(s) and then delete or not via the row number. Again, I really appreciate the response... --- On Tue, 5/26/09, Mark

Re: [R] split strings

2009-05-26 Thread Gabor Grothendieck
Although speed is really immaterial here this is likely to be faster than all shown so far: sub(".tif", "", basename(metr_list), fixed = TRUE) It does not allow file names with .tif in the middle of them since it will delete the first occurrence rather than the last but such a situation is highly

[R] OWL (Web Ontology Language) in R?

2009-05-26 Thread Stavros Macrakis
Is anyone working on an R package for manipulating OWL (Web Ontology Language), either natively or via an external library? I don't see anything obviously relevant in CRAN, though of course OWL functionality could be built up starting with the XML package. Thanks, -s [[alter

Re: [R] split strings

2009-05-26 Thread Wacek Kusnierczyk
Monica Pisica wrote: > Hi everybody, > > Thank you for the suggestions and especially the explanation Waclaw provided > for his code. Maybe one day i will be able to wrap my head around this. > > Thanks again, > you're welcome. note that if efficiency is an issue, you'd better have perl=T

[R] Still can't find missing data

2009-05-26 Thread Farley, Robert
I'm trying to prepare some cross tabs, looking at a number of variables against a variable "connector" which has 2 values: "OD Passenger" and " Connector". When I produce a xtabs one way I have observations under "Connector" but against a different variable "Connector" shows all 0 values. What

Re: [R] Problem accessing "row number" from subset on a dataframe

2009-05-26 Thread Mark Wardle
Hi. I may be missing what you're trying to achieve, but... what about subset(airquality, airquality$Month!=6) instead? You can do arbitrarily complex queries if you wish, combining terms logically. You don't have to use the subset function. You may find it helpful to see what the following res

[R] NNET conditional Multinomial logit

2009-05-26 Thread Raffaello Vardavas
Please, could you tell me how to enter a mixed or a purely conditional multinomial logit model in NNET. I know how to do a multinomial logit in NNET but I don't know how to do conditional or mixed models using this package. I do know how to do this with VGAM - but would like to compare my resu

[R] (OT) Does pearson correlation assume bivariate normality of the data?

2009-05-26 Thread Liviu Andronic
Dear all, The other day I was reading this post [1] that slightly surprised me: "To reject the null of no correlation, an hypothsis test based on the normal distribution. If normality is not the base assumption your working from then p-values, significance tests and conf. intervals dont mean much (

Re: [R] interactive file choosing in Linux?

2009-05-26 Thread Romain Francois
Hi, You might like tk_choose.files from package tcltk. This comes with R but your system needs to be capable enough: > capabilities( )["tcktk"] > require( tcltk ) > tk_choose.files Romain Derek Eder wrote: I am used to using the [R] function choose.files() for interactive file selection in

[R] interactive file choosing in Linux?

2009-05-26 Thread Derek Eder
I am used to using the [R] function choose.files() for interactive file selection in MS-Windows. What is the comparable function in Linux? I expected the function file.choose() to display similar behavior, i.e., a graphical interface diplaying a file listing, but all I seem to get is a "text

Re: [R] Linear Regression with Constraints

2009-05-26 Thread Ravi Varadhan
Here is a demonstration of how to solve your problem : n <- 30 # You might need more than 6 data points to get good estimates for 3 parameters x1 <- rnorm(n) x2 <- runif(n) x3 <- rbinom(n, size=1, prob=0.4) A <- cbind(x1, x2, x3) # 30 x 3 matrix of independent variables b <- c(-1, 0.5, 0.2)

[R] optim() question

2009-05-26 Thread Stephen Collins
I've seen with other software the capability for the optimizer to switch algorithms if it is not making progress between iterations. Is this capability available in optim()? Thanks, Stephen Collins, MPP | Analyst Health & Benefits | Aon Consulting [[alternative HTML version deleted]]

[R] Problem accessing "row number" from subset on a dataframe

2009-05-26 Thread Jason Rupert
I would like to use the "row number" information returned from performing a subset command on a dataframe. For example, I would like to automatically delete some rows from a dataframe if they match a criteria. Here is my example below. data(airquality) names(airquality) subset(airquality

Re: [R] Help me...!!!

2009-05-26 Thread Doran, Harold
The bad news, as others have indicated, is that this list is not for homework. The good news is that all of this is extremely easy in R!!! > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of abel1682 > Sent: Tuesday, May 26, 2009

Re: [R] R for arma mdel with constraints on parameters

2009-05-26 Thread Prof Brian Ripley
See the 'fixed' argument, which allows you to fix ARIMA parameters at any value, including zero. On Tue, 26 May 2009, FangTonggen wrote: Hi, i am learning R recently and find it very helpful in time series model. In ARMA model, given (p,q) it can get the estimation of a[i] and b[j] easily

[R] Linear Regression with Constraints

2009-05-26 Thread Stu @ AGS
Hi! I am a bit new to R. I am looking for the right function to use for a multiple regression problem of the form: y = c1 + x1 + (c2 * x2) - (c3 * x3) Where c1, c2, and c3 are the desired regression coefficients that are subject to the following constraints: 0.0 < c2 < 1.0, and 0.0 < c3 < 1.0 y

[R] Bootstrapping and estimation of standard error

2009-05-26 Thread Tomas Zelinsky
Hello, I've started using R few months ago and I really like it. I need to estimate standard deviation of certain statistics (some measures of poverty). I found a really simple program, and I just need to check whether it's OK and really calculates what it's supposed to. Let's suppose e. g.

[R] using lsoda() and nls() together

2009-05-26 Thread Benoit Boulinguiez
Thanks to Dieter Menne and Spencer Graves I started to get my way through lsoda() Now I need to use it in with nls() to assess parameters I have a go with a basic example dy/dt = K1*conc I try to assess the value of K1 from a simulated data set with a K1 close to 2. Here is (I think) the best co

Re: [R] long format - find age when another variable is first 'high'

2009-05-26 Thread William Dunlap
> From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Marc Schwartz > Sent: Monday, May 25, 2009 6:52 AM > To: David Freedman > Cc: r-help@r-project.org > Subject: Re: [R] long format - find age when another variable > is first 'high' > > > On May 25, 2009, a

Re: [R] How to create all pairs

2009-05-26 Thread Abhimanyu Lad
Thanks guys! expand.grid looks like the thing I need. Meanwhile, I also came up with an alternative way of doing it using rep and cbind. pairwise <- function(a,b) { aa = rep(a, each=length(b)) cbind(aa,b) } On Mon, May 25, 2009 at 9:52 PM, Mike Lawrence wrote: > expand.grid(i,j) > >

[R] degree symbol using X11 on OSX

2009-05-26 Thread Andy Jacobson
Howdy, Using the scheme in plotmath, I can no longer get the degree symbol for my on-screen plots, using X11 on OS X. I instead see an upper- case upsilon (I think). This is reproducible using "demo(plotmath)". A figure drawn with this faulty symbol produces correct postscript (i.e. wi

Re: [R] Discovery on packages

2009-05-26 Thread Phil Spector
Janna - Another thing that's sometimes useful with a new package is to run the example function, like example(TTR) This will run the examples from the documentation to give you a quick idea of what the package can do. - Phil Spector

Re: [R] split strings

2009-05-26 Thread Monica Pisica
Hi everybody, Thank you for the suggestions and especially the explanation Waclaw provided for his code. Maybe one day i will be able to wrap my head around this. Thanks again, Monica > Date: Tue, 26 May 2009 15:46:21 +0200 > From: waclaw.marcin.kus

Re: [R] Help me...!!!

2009-05-26 Thread Kevin E. Thorpe
Is this homework? If so, please read the posting guide and note the part about homework. Specifically, "Basic statistics and classroom homework: R-help is not intended for these." http://www.r-project.org/posting-guide.html abel1682 wrote: Hi to all...i'm a new R'user and i have to solve s

Re: [R] Help me...!!!

2009-05-26 Thread Mike Lawrence
http://www.r-project.org/posting-guide.html "Basic statistics and classroom homework: R-help is not intended for these. " On Tue, May 26, 2009 at 11:37 AM, abel1682 wrote: > > Hi to all...i'm a new R'user and i have to solve some exercies so i ask to > tou for an help... > > 1.) How i can demon

Re: [R] Help me...!!!

2009-05-26 Thread Simon Pickett
have a read at these pdfs http://cran.r-project.org/other-docs.html you are likely to get a bashing for asking people to do your homework for you! Simon. - Original Message - From: "abel1682" To: Sent: Tuesday, May 26, 2009 3:37 PM Subject: [R] Help me...!!! Hi to all...i'm

Re: [R] Discovery on packages

2009-05-26 Thread Duncan Murdoch
On 5/26/2009 10:25 AM, JannaB wrote: If I download a package -- how can I explore what it does? For instance, I downloaded the TTR package of off CRAN -- but how can I find out what it does? Is there a type of API doc for each package? JB If you ask for help using ?TTR, you'll get an overview p

Re: [R] Timing issue using locator() in loop containing print()

2009-05-26 Thread Bob Meglen
With the suggestion of Jim Holtman I have successfully implemented the loop containing locator() using RGUI by toggling the buffer to OFF. However, I am using JavaGD and the loop still will not work so the Java graphics window is apparently buffered and I can't figure out how to turn it off. I r

[R] Discovery on packages

2009-05-26 Thread JannaB
If I download a package -- how can I explore what it does? For instance, I downloaded the TTR package of off CRAN -- but how can I find out what it does? Is there a type of API doc for each package? JB __ R-help@r-project.org mailing list https://stat.et

[R] Help me...!!!

2009-05-26 Thread abel1682
Hi to all...i'm a new R'user and i have to solve some exercies so i ask to tou for an help... 1.) How i can demonstrate in R that the limit for x-->infinite of (1+1/x)^x is equal to "e"? 2.) if i have a vector of values how can i create a function that, applied to my vector, give me "median", "

Re: [R] help wth boxplots

2009-05-26 Thread Mike Lawrence
check out ggplot2: http://had.co.nz/ggplot2/ particularly: http://had.co.nz/ggplot2/geom_boxplot.html On Tue, May 26, 2009 at 10:34 AM, Amit Patel wrote: > > Hi > > I have a vector of data lets call zz (40 values from 4 samples) > the data is already in groups, i can even split up the samples us

Re: [R] Converting a list to a data frame or columns at the least

2009-05-26 Thread Glen Sargeant
Farrel Buchinsky-3 wrote: > > I have a column in which dates and times are specified thus > m/d/ HH:MM:SS > Alas, some entries do not include the time and therefore are only > m/d/ > so I used read.csv and specified that the relevant column should be read > as > is and it remained as a

[R] Odp: help wth boxplots

2009-05-26 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 26.05.2009 15:34:25: > > Hi > > I have a vector of data lets call zz (40 values from 4 samples) Are you sure it is a vector? Your indexing suggest data frame or matrix. > the data is already in groups, i can even split up the samples using > > SampA

Re: [R] Creating multiple graphs based on one variable

2009-05-26 Thread Luc Villandre
Tim Clark wrote: Dear List, I would like to create several graphs of similar data. I have x and y values for several different individuals (in this case fish). I would like to plot the x and y values for each fish separately. I can do it using a for loop, but I think I should be using "appl

Re: [R] split strings

2009-05-26 Thread Wacek Kusnierczyk
Monica Pisica wrote: > Hi everybody, > > I have a vector of characters and i would like to extract certain parts. My > vector is named metr_list: > > [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" > [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" > [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" > [4]

Re: [R] R under Ubuntu

2009-05-26 Thread Barry Rowlingson
On Tue, May 26, 2009 at 11:17 AM, Luis Ridao Cruz wrote: > R-help, > > I have installed R under Ubuntu and > I'm very new to a Linux distribution. > > To open an empty R session I just type R on the Terminal aplication. > But how can I open a saved workspace? > At present I just start R and then l

Re: [R] split strings

2009-05-26 Thread Gabor Grothendieck
Try this: sub(".tif$", "", basename(metr_list)) On Tue, May 26, 2009 at 9:27 AM, Monica Pisica wrote: > > Hi everybody, > > I have a vector of characters and i would like to extract certain parts. My > vector is named metr_list: > > [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" > [2] "F:/Naval_Li

Re: [R] split strings

2009-05-26 Thread Ronggui Huang
They look like file path, so you can make use of basename() first, then use gsub to strip the suffix. > x<-c("F:/Naval_Live_Oaks/2005/data//BE.tif","F:/Naval_Live_Oaks/2005/data//CH.tif") > x2<-sapply(x,basename,USE.NAMES=FALSE) > gsub("[.].{1,}$","",x2) [1] "BE" "CH" Ronggui 2009/5/26 Monica Pi

[R] help wth boxplots

2009-05-26 Thread Amit Patel
Hi I have a vector of data lets call zz (40 values from 4 samples) the data is already in groups, i can even split up the samples using SampA <- zz[,2:11] SampB <- zz[,12:21] SampC <- zz[,22:31] SampV <- zz[,32:41] I would like an output that gives me 4 boxplots on one plot one boxplot for the

Re: [R] sciplot question

2009-05-26 Thread Jarle Bjørgeengen
On May 26, 2009, at 3:02 , Frank E Harrell Jr wrote: Jarle Bjørgeengen wrote: On May 26, 2009, at 4:37 , Frank E Harrell Jr wrote: Manuel Morales wrote: On Mon, 2009-05-25 at 06:22 -0500, Frank E Harrell Jr wrote: Jarle Bjørgeengen wrote: On May 24, 2009, at 4:42 , Frank E Harrell Jr wrote

[R] split strings

2009-05-26 Thread Monica Pisica
Hi everybody, I have a vector of characters and i would like to extract certain parts. My vector is named metr_list: [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" [4] "F:/Naval_Live_Oaks/2005/data//HOME.t

Re: [R] stricter use of xlim in plot.stepfun

2009-05-26 Thread Sebastian Meyer
Jim wrote: > Have a look at par(xaxs="i"), which you can pass to the plot function > as well. Hi everybody, Thank you very much for your suggestion, Jim. I did not think of that graphical parameter "xaxs". It would really be a workaround for my first example. Unfortunately, it does not solve the

[R] facet_grid problem: don't understand error message

2009-05-26 Thread Etches Jacob
The following is a plot that used to work (last December, I think with a patched version of ggplot2 from Hadley), but has stopped working with recent updates. Other instances of facet_grid work and the data look normal to me. Since I have no idea what caused the error message, I'm having

Re: [R] Running R from a read-only CD

2009-05-26 Thread Gavin Simpson
On Mon, 2009-05-25 at 17:36 -0400, Charles Annis, P.E. wrote: > I'm not sure how not to use chm help, since that's the only way I've ever > done things. > > But why would things work well from a USB Flash Drive and not for a CD when > the folders are identical? (The CD was burned from the image o

[R] R for arma mdel with constraints on parameters

2009-05-26 Thread FangTonggen
Hi, i am learning R recently and find it very helpful in time series model. In ARMA model, given (p,q) it can get the estimation of a[i] and b[j] easily with arima() function. X[t] = a[1]X[t-1] + ... + a[p]X[t-p] + e[t] + b[1]e[t-1] + ... + b[q]e[t-q] but in my recent data model,

Re: [R] sciplot question

2009-05-26 Thread Frank E Harrell Jr
Jarle Bjørgeengen wrote: On May 26, 2009, at 4:37 , Frank E Harrell Jr wrote: Manuel Morales wrote: On Mon, 2009-05-25 at 06:22 -0500, Frank E Harrell Jr wrote: Jarle Bjørgeengen wrote: On May 24, 2009, at 4:42 , Frank E Harrell Jr wrote: Jarle Bjørgeengen wrote: On May 24, 2009, at 3:34

Re: [R] Selection and aggregation in one operation?

2009-05-26 Thread Gabor Grothendieck
If, as in this example, i is always 1, 2, ... and has an odd length in each group then: do.call(rbind, by(DF, DF$id, function(x) x[median(x$i), ])) On Tue, May 26, 2009 at 8:13 AM, Zeljko Vrba wrote: > I have a large data-frame with measurements such as: > > id i v1  v2  v3 > 1  1 1.1 1.2 1.3 >

Re: [R] R under Ubuntu

2009-05-26 Thread Ronggui Huang
I think it is standard practice. If you want R to load a workspace automatically when R is launched, you can add the command in .Rprofile. See ?Startup for more on Initialization at Start of an R Session. Ronggui 2009/5/26 Luis Ridao Cruz : > R-help, > > I have installed R under Ubuntu and > I'm

Re: [R] moving from Windows to Linux - need help

2009-05-26 Thread Paul Hiemstra
And with ubuntu in combination with the Array.org eeepc repository, the installation is a piece of cake (if you follow the instructions on the site). cheers, Paul Jarle Bjørgeengen wrote: On May 26, 2009, at 1:13 , Jarle Bjørgeengen wrote: Hi Robert, I agree with Robert. You meant you a

[R] Selection and aggregation in one operation?

2009-05-26 Thread Zeljko Vrba
I have a large data-frame with measurements such as: id i v1 v2 v3 1 1 1.1 1.2 1.3 1 2 1.4 1.5 1.6 1 3 1.5 1.7 1.8 2 1 2.1 2.2 2.3 2 2 2.7 2.5 2.6 2 3 2.4 2.8 2.9 For each unique value of 'id' (which in the real data-set is a combination of three variables) I want to compute the median of

Re: [R] stricter use of xlim in plot.stepfun

2009-05-26 Thread Jim Lemon
Sebastian Meyer wrote: Dear R developer, I am not quite sure, if I should post my concern as a wish to r-b...@r-project.org. Thus, as recommended, I first send an email to you. My request is the following: I would appreciate, if it was possible to obtain a plot of a 'stepfun' with a strict inte

Re: [R] moving from Windows to Linux - need help

2009-05-26 Thread Jarle Bjørgeengen
On May 26, 2009, at 1:13 , Jarle Bjørgeengen wrote: Hi Robert, I agree with Robert. You meant you agree with Paul, right ? > Of course :-) BR Jarle Bjørgeengen __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] moving from Windows to Linux - need help

2009-05-26 Thread Jarle Bjørgeengen
Hi Robert, I agree with Robert. It seems the cleanest way of getting R on Linux is to use one of the Linux distros R is packaged for. It may work otherwise, but there _will_ be more fiddling around resolving dependencies manually or semi manually. Best regards. - Jarle Bjørgeengen On Ma

Re: [R] moving from Windows to Linux - need help

2009-05-26 Thread Philipp Pagel
On Tue, May 26, 2009 at 11:02:22AM +0100, Robert Kinley wrote: > I've used R for many years on windows machines, but > have now acquired an Asus eee 1000 linux machine. > > In order to get the best out of the machine, I used the > 'pimpmyeee.sh' script, to get the full KDE desktop. > > The versi

Re: [R] R-windows unsuccessful

2009-05-26 Thread Paul Hiemstra
Hi, perl not found This says that perl is not installed, you need to install it. In addition, I am not really sure what "all necessary pacakges" or "your software" is and what you want to do with R. Please read the posting guide carefully for requirements for postings to the help list. In ad

Re: [R] moving from Windows to Linux - need help

2009-05-26 Thread Paul Hiemstra
Hi Robert, I had the exact same problem on my eeepc 900. I replaced the xandros-like linux in this way: - Download an Ubuntu iso file (I use 8.04, Kubuntu) - Put the .iso file on a usb stick (use unetbootin) - Install the ubuntu version - Install the eeepc specific stuff from http://array.org/

[R] R under Ubuntu

2009-05-26 Thread Luis Ridao Cruz
R-help, I have installed R under Ubuntu and I'm very new to a Linux distribution. To open an empty R session I just type R on the Terminal aplication. But how can I open a saved workspace? At present I just start R and then load ("my_workspace") but it must be possible to do it all at oncer

[R] stricter use of xlim in plot.stepfun

2009-05-26 Thread Sebastian Meyer
Dear R developer, I am not quite sure, if I should post my concern as a wish to r-b...@r-project.org. Thus, as recommended, I first send an email to you. My request is the following: I would appreciate, if it was possible to obtain a plot of a 'stepfun' with a strict interpretation of xlim. What

[R] R-windows unsuccessful

2009-05-26 Thread Clinton
To whom it may concern We are currently trying to utilize your software on windows. We have downloaded all necessary packages and followed instructions as to how to perform the model. Thus the installation has worked perfectly, however when trying to run the program an error message appears "Co

[R] Converting a list to a data frame or columns at the least

2009-05-26 Thread Farrel Buchinsky
I have a column in which dates and times are specified thus m/d/ HH:MM:SS Alas, some entries do not include the time and therefore are only m/d/ so I used read.csv and specified that the relevant column should be read as is and it remained as a character variable. I then split the value on

Re: [R] Help needed on R output

2009-05-26 Thread Adrian Dusa
A simpler solution: my.string <- c("", "01001001011011101100", "1001001011010101", "1101110100000011", "000100100101001001011001", "000101101101101001101001") my.string <- paste(my.string, collapse="\",\n

Re: [R] How R connects to the internet

2009-05-26 Thread Duncan Murdoch
Menezes, Ian wrote: Stefan, Thanks for the response I'm using the GUI version of R in Windows. I usually just click the R icon on my desktop, so Im not sure how I would use the --internet2 option? You can edit the shortcut (right click and follow the menus), or install R with that option

[R] moving from Windows to Linux - need help

2009-05-26 Thread Robert Kinley
hi I've used R for many years on windows machines, but have now acquired an Asus eee 1000 linux machine. In order to get the best out of the machine, I used the 'pimpmyeee.sh' script, to get the full KDE desktop. The version of Linux is Xandros, which I believe is a close relative of Debian, bu

Re: [R] Help needed on R output

2009-05-26 Thread Jim Lemon
peng chen wrote: Hi, R experts: I am trying to generate data output in the following format: rom_array := ( "", "01001001011011101100", "1001001011010101", "1101110100000011", "000100100101001001011001", "00

Re: [R] Creating multiple graphs based on one variable

2009-05-26 Thread Stefan Grosse
On Tue, 26 May 2009 02:34:55 -0700 (PDT) Tim Clark wrote: TC> I would like separate plots for Tony, Mike, and Vicky. What is the TC> best way to do this? use the lattice package: library(lattice) xyplot(y~x|Name,data=dat) Mr. Sarkar (the author of the package) has written an excellent book

[R] Creating multiple graphs based on one variable

2009-05-26 Thread Tim Clark
Dear List, I would like to create several graphs of similar data. I have x and y values for several different individuals (in this case fish). I would like to plot the x and y values for each fish separately. I can do it using a for loop, but I think I should be using "apply". Please let m

Re: [R] Sample size calculation proportions with EpiR: Discrepancy to other calculators

2009-05-26 Thread Chuck Cleland
On 5/26/2009 2:53 AM, Karl Knoblick wrote: > Hallo! > > I have done a sample size calculation for proportions with EpiR. The input is: > treatment group rate p=0.65 > control group rate p=0.50 > significance level 0.95 > power 0.80 > two-sided > ration group 1 and 2: 1.0 > > I have done this in t

Re: [R] Need a faster function to replace missing data

2009-05-26 Thread Tim Clark
Many thanks to Jim, Bill, and Carl. Using indexes instead of the for loop gave me my answer in minutes instead of hours! Thanks for all of your great suggestions! Aloha, Tim Tim Clark Department of Zoology University of Hawaii --- On Fri, 5/22/09, jim holtman wrote: > From: jim holtman

Re: [R] cross-validation in rpart

2009-05-26 Thread Paolo Radaelli
Dear R users, I know cross-validation does not work in rpart with user defined split functions. As Terry Therneau suggested, one can use the xpred.rpart function and then summarize the matrix of the predicted values into a single "goodness" value. I need only a confirmation: set for example xva

  1   2   >