Re: [R] manipulating text to generate different formulas to use in nls()

2009-08-11 Thread bartjoosen
Take a look at ?eval Bart Héctor Villalobos-2 wrote: > > Hello, > > In doing a series of non-linear estimations of a function which is a sum > of a varying number > of sinusoids, I would like to "autogenerate" the arguments needed by nls() > depending on that > number. > > For example, whe

Re: [R] creating selection vector with 2 attributes

2009-08-11 Thread Gavin Simpson
On Mon, 2009-08-10 at 16:57 -0700, PDXRugger wrote: > Please consider the following: > > IsEugene <- Hhdata$Puma %in% > PumsAreaNames..$PumaNums[(PumsAreaNames..$PumaNames == "Eugene")] I presume the .. before the $ are just a typo here? > > #-- > > I

Re: [R] nested repeated measures MANOVA using adonis

2009-08-11 Thread Gavin Simpson
On Mon, 2009-08-10 at 23:11 -0400, Kevin Parsons wrote: > I am trying to apply a permuation-based MANOVA (Anderson 2001) to a set of > morphological data from three ecomorphs of fish reared under two different > conditions and measured at two points during ontogeny. I will supply a > distance matri

[R] outlier detection test for large data set

2009-08-11 Thread Martial Sankar
Hello, Which outlier detection test is robust for large dataset ? I think the detection test in the package 'outliers' are suitable for small data set (between 3 and 100). Do you know one for 2 or more values ? Thanks, - Martial ___

[R] How do I plot: regression line, regression line + s.d, regression line - s.d on the same chart?

2009-08-11 Thread Jorgy Porgee
Hello all, I've got a scatter plot, for which I create a regression line using: reg<- lm(yvars~xvars) and can plot the regression through the scatter just fine. I'd like to add two additional lines on the scatter plot: one being regressionline+standard deviation, the other being regressionline-stan

Re: [R] obtain linear regression parameters from qplot

2009-08-11 Thread ONKELINX, Thierry
It's much easier to extract that info from lm itself. Model <- lm(Intensity ~ Time, data = totalD, subset = Name == "increase1") coef(Model) HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek /

[R] Slicing cra**y csv files

2009-08-11 Thread jorgusch
Hello, For not too regular users of R, preparing the data is somehow a burden. Comming from iMacro in FireFox I get a badly designed csv, which I need to put into a daily R script. The data looks like that (e.g.): 22 Results,"35 Results","39 Results","2 Results","7 Results","23 Results","42 Res

Re: [R] ggplot: colours to geom_segments

2009-08-11 Thread ONKELINX, Thierry
Dear John, You need to change colour = "darkgreen" into aes(colour = Food). This will give a different colour along Food. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute

[R] Lattice: How to do error bars

2009-08-11 Thread Alex van der Spek
I am trying to add 2 stdev error bars to lattice type plots: panel.ebar<-function(x,y,dy=NULL,...) { panel.xyplot(x,y,...) panel.segments(x,y-dy,x,y+dy,...) } Then: xyplot(y~x|fc,data=dat,dy=dat$dy,panel=panel.ebar) This adds error bars but they are not conditioned on the factor

[R] How to Import Excel file into R 2.9.0 version

2009-08-11 Thread rajclinasia
Hi Every one, I have a problem with Reading Excel file into R 2.9.0 version. In older versions it is working with "xlsReadWrite" package. But in 2.9.0 version there is no package like that. so help me out in this aspect. Thanks in Advance. -- View this message in context: http://www.nabble.com

[R] what is returned if a match is not found using grep

2009-08-11 Thread Rnewbie
dear all, I tried to use grep to match IDs in two dataframes grep(DF1$ID[i], DF2$ID) I wanted to use condition in a loop, but I have the problem to define what is in return if a match is not found. I used mode() and class() to compare between the attributes when a match is found and not found,

Re: [R] How to Import Excel file into R 2.9.0 version

2009-08-11 Thread Ronggui Huang
You can download it from http://treetron.googlepages.com/xlsreadwrite.htm Also, you may have a look at Data import/export manual, which has a relevant section. Ronggui 2009/8/11 rajclinasia : > > Hi Every one, > I have a problem with Reading Excel file into R 2.9.0 version. In older > versions i

Re: [R] How do I plot: regression line, regression line + s.d, regression line - s.d on the same chart?

2009-08-11 Thread Dimitris Rizopoulos
have a look at predict.lm() and specifically at the 'interval' argument -- check also the following x <- runif(100, -5, 5) y <- 3 + 2 * x + rnorm(100, sd = 2) fit <- lm(y ~ x) xx <- seq(min(x), max(x), length.out = 30) pred <- predict(fit, newdata = data.frame(x = xx), interval = "p") plot(x,

[R] Generating R plots via Ruby CGI

2009-08-11 Thread Michael Richardson
Greetings, I'm trying to debug a simple two-line plot routine in R called test.R: cor(swiss) plot(swiss$Catholic, swiss$Examination) These commands work fine when typed into R. They also work fine when I invoke this routine by the following line into my terminal: R --slave < /Library

Re: [R] overlap two graph

2009-08-11 Thread Hemavathi Ramulu
thanks Zhiliang. It's helped me to go further on it. On Tue, Aug 11, 2009 at 2:13 PM, Zhiliang Ma wrote: > plot(allPoints, col=c(rep(2,201), rep(3,201))) > > On Mon, Aug 10, 2009 at 9:54 PM, Hemavathi Ramulu > wrote: > > Hi everyone, > > I'm stuck again, need you all help. > > > > I managed to

[R] sub-architecture installation difficulty with various valgrind-instrumentation levels

2009-08-11 Thread pleydell
"R Installation and Administration", section 2.5 "Sub-architectures" describes calling specific builds of R using the call "R --arch=name". I am trying to build and install three versions of R-2.9.1, each configured with a different valgrind-instrumentation level ("Writing R Extensions", section 4.

Re: [R] Slicing cra**y csv files

2009-08-11 Thread Patrick Connolly
On Tue, 11-Aug-2009 at 01:39AM -0700, jorgusch wrote: |> |> Hello, |> |> For not too regular users of R, preparing the data is somehow a burden. |> |> Comming from iMacro in FireFox I get a badly designed csv, which I need to |> put into a daily R script. |> The data looks like that (e.g.):

Re: [R] plotrix: reverse axis in polar.plot

2009-08-11 Thread Jim Lemon
Thomas Steiner wrote: ... I answered too fast: I want the radial, not the tangential axis to change direction. So the center will be (0,90) and the outer circle's second coordiante will be zero (the horizon). This might sound strange – even for Australien people (-; Thomas This requires an ex

Re: [R] How do I plot: regression line, regression line + s.d, regression line - s.d on the same chart?

2009-08-11 Thread ONKELINX, Thierry
Another option is to use ggplot2 Dataset <- data.frame(x = runif(100, -5, 5)) Dataset$y <- 3 + 2 * Dataset$x + rnorm(100, sd = 2) library(ggplot2) ggplot(Dataset, aes(x = x, y = y)) + geom_smooth(method = "lm") + geom_point() -

Re: [R] what is returned if a match is not found using grep

2009-08-11 Thread Duncan Murdoch
Rnewbie wrote: dear all, I tried to use grep to match IDs in two dataframes grep(DF1$ID[i], DF2$ID) I wanted to use condition in a loop, but I have the problem to define what is in return if a match is not found. I used mode() and class() to compare between the attributes when a match is found

Re: [R] NotePad++ Syntax file

2009-08-11 Thread Bjørn-Helge Mevik
"[Ricardo Rodriguez] Your XEN ICT Team" writes: > John Kane wrote: >> No but have you had a look at Tinn-R http://www.sciviews.org/Tinn-R/. > > Any similar option for Mac OS X? I guess you can use Emacs on Mac OS X. -- Bjørn-Helge Mevik __ R-help@

Re: [R] what is returned if a match is not found using grep

2009-08-11 Thread Rnewbie
Thank you very much!!! Duncan Murdoch-2 wrote: > > Rnewbie wrote: >> dear all, >> >> I tried to use grep to match IDs in two dataframes >> >> grep(DF1$ID[i], DF2$ID) >> >> I wanted to use condition in a loop, but I have the problem to define >> what >> is in return if a match is not found. I us

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread jim holtman
Works fine for me: > x <- read.table(textConnection(" X Y V3 + 2 2 1 8.062258 + 3 3 1 2.236068 + 4 4 1 6.324555 + 5 5 1 5.00 + 6 1 2 8.062258 + 8 3 2 9.486833 + 9 4 2 2.236068 + 10 5 2 5.656854 + 11 1 3 2.236068 + 12 2 3 9.486833 + 14 4 3 8.062258 + 15 5 3 5.099020 + 16 1 4 6.32

Re: [R] How to Import Excel file into R 2.9.0 version

2009-08-11 Thread Rodrigo Aluizio
Hi, take a look at the gdata package (any plataform) function read.xls(), and at the package RODBC (if you are on a Windows Plataform) at the functions odbcConnectExcel(), odbcConnectExcel2007() and sqlFetch(). Hope this helps Rodrigo. 2009/8/11 rajclinasia > > Hi Every one, > I have a problem

Re: [R] Statistician Needed

2009-08-11 Thread Paul Chatfield
Hi Noah - I work for the statistical services centre and could help. Email p.s.chatfi...@rdg.ac.uk, Paul Noah Silverman-3 wrote: > > Hello, > > I've come up with some challenges with my process that are a bit too > complicated for the mailing list. > > Is there anyone out there, prefera

[R] Re : How to Import Excel file into R 2.9.0 version

2009-08-11 Thread Inchallah Yarab
i advice you to save the file under csv and then use read.csv2("c:/file.csv",sep=",") hope that helps!!! inchallahyarab 2009/8/11 rajclinasia > > Hi Every one, > I have a problem with Reading Excel file into R 2.9.0 version. In older > versions it is working with "xlsReadWrite" package. But

[R] RES: Re : How to Import Excel file into R 2.9.0 version

2009-08-11 Thread Leandro Marino
Another possibility is to download the xlsReadWrite package in http://treetron.googlepages.com/xlsreadwrite.htm And use the read.xls() function. I am using this package without problems. Atenciosamente, Leandro Lins Marino Centro de Avaliação Fundação CESGRANRIO Rua Santa Alexandrina, 1011 -

[R] Import more than one sheet in a single excel file

2009-08-11 Thread rajclinasia
Hi Every one, my question is, How to Import more than one sheet in a single excel file (e.g. 10 sheets in one excel file) into R and create datasets for all the sheets in a single excel file without specifying the sheetnames. Thank you in Advance. -- View this message in context: http://www.n

[R] Varying x-axis labels in lattice

2009-08-11 Thread Frank E Harrell Jr
Dear Group: I want to use lattice with a formula such as y ~ x | v to plot a data frame in which v varies to indicate which "x" is really being plotted. I know how to make the x-axis scales vary with the panel but is it possible to let the x-axis label vary, i.e., to let the user specify a ve

Re: [R] Import more than one sheet in a single excel file

2009-08-11 Thread Gabor Grothendieck
In read.xls in the gdata package there is an argument that is 1 for the first sheet, 2 for the second, etc. If you run it with verbose = TRUE it will tell you how many sheets are there. On Tue, Aug 11, 2009 at 9:09 AM, rajclinasia wrote: > > Hi Every one, > my question is, How to Import more than

Re: [R] Import more than one sheet in a single excel file

2009-08-11 Thread Dieter Menne
rajclinasia wrote: > > my question is, How to Import more than one sheet in a single excel file > (e.g. 10 sheets in one excel file) into R and create datasets for all the > sheets in a single excel file without specifying the sheetnames. > Please do read the replies to your same questions so

Re: [R] Slicing cra**y csv files

2009-08-11 Thread John Kane
There was a couple of strange characters in the post so I am not sure that I understand exactly what the data looks like but if you are getting a vector of results that look like "22 Results","35 Results","39 Results","2 Results","7 Results","23 Results", "42 Results","36 Results","22 Results",

[R] Line of Organic Correlation (help with writing function)

2009-08-11 Thread stephen sefick
I would like to calculate the line of organic correlation, so that I can use it for record extension for a stream gauging station. Below is a description (1) and then my first attempt with R code (2). Thanks in advance for any help. Stephen Sefick The LOC minimizes the sum of the areas of right

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread John Kane
Clearly I was more tired than I realised last night. :( My appologies. In any case with the data.frame name changed to xx this seems to give you what you want subset(xx, xx[,1] > xx[,2]) or using the data name subset(data, data[,1] > data[,2]) should work as well --- On Mon, 8/10/09, J

Re: [R] How to Import Excel file into R 2.9.0 version

2009-08-11 Thread Kelvin Lam
Use odbcConnectExcel() in the RODBC package. rajclinasia wrote: > > Hi Every one, > I have a problem with Reading Excel file into R 2.9.0 version. In older > versions it is working with "xlsReadWrite" package. But in 2.9.0 version > there is no package like that. so help me out in this aspect

Re: [R] Generating R plots via Ruby CGI

2009-08-11 Thread Scott Sherrill-Mix
My guess is that R doesn't have a display so it's trying to make it's default Rplots.pdf instead. What if you generate a .eps in an appropriate location (that's writeable by your server)? e.g.: postscript('/Library/WebServer/Documents/gsa/test.eps',horizontal=FALSE) plot(swiss$Catholic, swiss$Exam

[R] metaplot in rmeta: y-axis disappears

2009-08-11 Thread Roaman
Hi, I have a problem with the metaplot-function in rmeta. After plotting a Forest Plot with "metaplot", no y-axis is shown for normal plots anymore. Does someone know, why this is and how I can solve it? Thank you in advance! Kind regards, Roman -- View this message in context: http://www.n

Re: [R] what is returned if a match is not found using grep

2009-08-11 Thread Rnewbie
sorry, I still have a question. What is the difference between an empty vector and a vector of length 0? When I assign x<-c() is.null(x) is TRUE x<-integer(0) is.null(x) is FALSE Duncan Murdoch-2 wrote: > > Rnewbie wrote: >> dear all, >> >> I tried to use grep to match IDs in two dataframes >

[R] Generic attribute in multinom function

2009-08-11 Thread Benjamin Geckle
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] Help on a combinatorial task (lists?)

2009-08-11 Thread Serguei Kaniovski
Hello! I have the following combinatorial problem. Consider the cumulative sums of all permutations of a given weight vector 'w'. I need to know how often weight in a certain position brings the cumulative sums equal or above the given threshold 'q'. In other words, how often each weight is deci

Re: [R] ggplot: colours to geom_segments

2009-08-11 Thread Paul Emberson
Hi John, Try pa + scale_colour_brewer() and see ?scale_colour_brewer for options Also see scale_colour_manual where you can use the values parameter to choose your own colours. Cheers, Paul John Kane wrote: >> Paul Emberson "You need to map colour to a variable. Try >> geom_segment(mapping=

Re: [R] ggplot: colours to geom_segments

2009-08-11 Thread ONKELINX, Thierry
John, Have a look at scale_colour_manual() (http://had.co.nz/ggplot2/scale_manual.html) HTH, Thierry PS My solution was exactly the same as Paul's. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Res

[R] How to specify an addition Rprofile file for Rscript in the command line?

2009-08-11 Thread Peng Yu
Hi, When I use Rscript, I want that it load an additional Rprofile file besides the default ones. I don't find such an option. Can somebody let me know if there is such an option? Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/

[R] Passing a list object to lapply

2009-08-11 Thread Fowler, Mark
Hello, I'm having difficulty passing an object name to a lapply function. Can somebody tell me the trick to make this work? #Works T13702 <- TRACKDATA[["13702.xls"]][["data"]] min(unlist(lapply(list(T13702), function(x) mdy.date(x[1, 2], x[1, 1], x[1, 3] 16553 #Works d<-2 assign(paste("T",s

Re: [R] How to show help in the same mode as where the commands is input?

2009-08-11 Thread Peng Yu
Hi, I have type ctrl-C to get back the R prompt. Is there a way to avoid doing it? Regards, Peng On Thu, Aug 6, 2009 at 2:25 PM, Romain Francois wrote: > Hi, > > You can define your own pager: > > Something like this might do what you want: > > dump.pager <- function( files, ...){ >        cat(

Re: [R] ggplot: colours to geom_segments

2009-08-11 Thread John Kane
> Paul Emberson > "You need to map colour to a variable. Try > geom_segment(mapping=aes(colour=Food)) " That did it. Apparently I have not gotten to 'mapping' yet in the book! > Thierry.ONKELINX > You need to change colour = "darkgreen" into aes(colour = Food). This > will give a different col

Re: [R] what is returned if a match is not found using grep

2009-08-11 Thread Duncan Murdoch
Rnewbie wrote: sorry, I still have a question. What is the difference between an empty vector and a vector of length 0? When I assign x<-c() is.null(x) is TRUE x<-integer(0) is.null(x) is FALSE NULL is a special object in R. is.null() returns TRUE for it. c() returns it. integer(0) is

[R] SEM decomposition of Hessian

2009-08-11 Thread Kathryn Barto
I'm trying to run an SEM, but I keep getting the following error message. In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian. Optimization probably did not converge. I have 4 latent variables (plant, AMF, abiotic, and s

Re: [R] ggplot: colours to geom_segments

2009-08-11 Thread John Kane
> Paul Emberson > try pa + scale_colour_brewer() and > see ?scale_colour_brewer for options > Also see scale_colour_manual where you can use the values parameter to > choose your own colours. > Thierry.ONKELINX > Have a look at scale_colour_manual() > (http://had.co.nz/ggplot2/scale_manual.html)

Re: [R] Help on a combinatorial task (lists?)

2009-08-11 Thread jim holtman
Does 'unlist' do it for you: > w <- c(3,3,2,1) # vector of weights > q <- 4 # theshold > > # computes which coordinate of w is decisive in each permutation > res <- unlist(sapply( permn(w), function(x) which(w == x[min(which(cumsum(x) > >=q))]) )) > > # complies the frequencies > prop.table( ta

Re: [R] matrix power

2009-08-11 Thread Nordlund, Dan (DSHS/RDA)
Cindy, I don’t know of a better way to do this than what Ted Harding showed. Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 From: cindy Guo [mailto

[R] re placePatterns() for multiple words replacement in tm

2009-08-11 Thread Kelvin Lam
Hi all, I wonder how you can replace all words that need to be changed using replacePatterns(). The following is my code. I want to replace both "abc" and "def" to " Yes ". However, I can only replace the first occurrence in sample[[1]]. > sample[[1]] [1] abc def ghi > change <- c("abc","def"

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-11 Thread Terry Therneau
For 90 percent of what I do I strongly prefer the loose (S3) rather than the rigid (S4) classes. So I'm closer to Rolf. My summary of S4 vs S3 A large increment in 1. nuisance to write 2. difficulty to debug 3. ability to write very obscure code 4. design Gain 5. ability to dir

Re: [R] Import more than one sheet in a single excel file

2009-08-11 Thread Keo Ormsby
rajclinasia escribió: Hi Every one, my question is, How to Import more than one sheet in a single excel file (e.g. 10 sheets in one excel file) into R and create datasets for all the sheets in a single excel file without specifying the sheetnames. Thank you in Advance. Hello, One way is to use

Re: [R] [SOLVED] utf8 encoding and postscript

2009-08-11 Thread Alexandros Droseltis
On Tue, Aug 11, 2009 at 08:46 +0200, Alexandros Droseltis wrote: > I wrote a script file with the following commands > > postscript() > [...] > barplot(pr, xlab="Länge") > > In the output file (Rplots.ps) the german umlaut is printed as "L..nge". > How could I set the encoding correctly? I found

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-11 Thread spencerg
Hi, Terry: Thanks for the comments. I too vastly prefer S3 to S4. Your comparison is based on much greater experience than mine. Could you please check the link you sent? I couldn't get it to work. Thanks again. Spencer Terry Therneau wrote: For 90 percent of

[R] help on Rmpi

2009-08-11 Thread Zhiliang Ma
Dear R Users, I'm using Rmpi package for paralleling computing. It's very useful. But I have two question: 1. before running processes on slaves, all the data should be sent to them. however, if i forget to broadcast some of the data, the master will freeze, and I have to kill the process manuall

[R] list indexing problem reading in files from a directory

2009-08-11 Thread stephen sefick
I am running into a problem with allocating these files to a list as they are read in through a for loop. I know I am probably doing something wrong, but I can't figure out what. I know this is not reproducible. I am ending up with a data frame of the very last file to be read in. I know it is

[R] error in names

2009-08-11 Thread Inchallah Yarab
Hi, what is meaning this errors !!! Error in names(o.pr)[p.ok] <- names(qs) :   incompatible types (from NULL to character) in subassignment type fix In addition: Warning message: In Ops.factor(from, (0:(length.out - 1)) * by) :   + not meaningful for factors thank you very much

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-11 Thread Frank E Harrell Jr
spencerg wrote: Hi, Terry: Thanks for the comments. I too vastly prefer S3 to S4. Your Me too. My summary is this: If you love computer science more than you value your own time, use S4. Frank Harrell comparison is based on much greater experience than mine. Could you please

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-11 Thread Duncan Murdoch
On 8/11/2009 1:24 PM, spencerg wrote: Hi, Terry: Thanks for the comments. I too vastly prefer S3 to S4. Your comparison is based on much greater experience than mine. Could you please check the link you sent? I couldn't get it to work. It's a small typo, the correction

Re: [R] error in names

2009-08-11 Thread Gavin Simpson
On Tue, 2009-08-11 at 17:49 +, Inchallah Yarab wrote: > Hi, > what is meaning this errors !!! > Error in names(o.pr)[p.ok] <- names(qs) : > incompatible types (from NULL to character) in subassignment type fix I can replicate this error by 'qs' not having names. what does names(qs) show?

Re: [R] re placePatterns() for multiple words replacement in tm

2009-08-11 Thread Bert Gunter
Don't use replacePatterns() (-- and what package is that from, btw??). gsub("abc|def","Yes",sample[[1]]) Incidentally, "sample" is a rather bad name for your dataset, as it is the name of a commonly use R function. Ergo, possibility of confusion. Bert Gunter Genentech Nonclinical Biostatisics

Re: [R] re placePatterns() for multiple words replacement in tm

2009-08-11 Thread Kelvin Lam
Thanks. The replacePatterns() is from the text mining package tm(). Bert Gunter wrote: > > Don't use replacePatterns() (-- and what package is that from, btw??). > > gsub("abc|def","Yes",sample[[1]]) > > Incidentally, "sample" is a rather bad name for your dataset, as it is the > name of a c

Re: [R] list indexing problem reading in files from a directory

2009-08-11 Thread Charles C. Berry
On Tue, 11 Aug 2009, stephen sefick wrote: I am running into a problem with allocating these files to a list as they are read in through a for loop. I know I am probably doing something wrong, but I can't figure out what. I know this is not reproducible. I am ending up with a data frame of th

Re: [R] list indexing problem reading in files from a directory

2009-08-11 Thread Gavin Simpson
On Tue, 2009-08-11 at 12:45 -0500, stephen sefick wrote: > I am running into a problem with allocating these files to a list as > they are read in through a for loop. I know I am probably doing > something wrong, but I can't figure out what. I know this is not > reproducible. I am ending up with

[R] Transform array in dataframe; melt(); reshape()

2009-08-11 Thread Cecilia Carmo
Hi everyone. Could anyone help me to reshape my data? Reproducible example: firm<-sort(rep(1:1000,10),decreasing=F) year<-rep(1998:2007,1000) industry<-rep(c(rep(1,10),rep(2,10),rep(3,10),rep(4,10),rep(5,10),rep(6,10),rep(7,10),rep(8,10),rep(9,10), + rep(10,10)),1000) X1<-rnorm(1) X2<-rnorm(

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-11 Thread Ben Bolker
I can see that fortune("S4") is going to produce more than one possible response soon ... (is Achim Zeleis listening?) Ben Frank E Harrell Jr wrote: > > spencerg wrote: >> Hi, Terry: >> >> Thanks for the comments. I too vastly prefer S3 to S4. Your > > Me too. My summary is t

[R] R installation on Linux/PPC with tcltk support

2009-08-11 Thread Ryan Golhar
I'm trying to install R on an IBM P570 running Redhat Enterprise Linux v4. When I run ./configure, I see: checking for tclConfig.sh... no checking for tclConfig.sh in library (sub)directories... /usr/lib64/tclConfig.sh checking for tkConfig.sh... no checking for tkConfig.sh in library (sub)di

Re: [R] R installation on Linux/PPC with tcltk support

2009-08-11 Thread Ryan Golhar
Nevermind. I had both the ppc and ppc64 versions of tcl and tk installed. I removed ppc64 versions and everything works now. Must have been a conflict. Ryan Golhar wrote: I'm trying to install R on an IBM P570 running Redhat Enterprise Linux v4. When I run ./configure, I see: checking fo

[R] ggplot2: override facet names in facet_wrap?

2009-08-11 Thread Ben Bolker
just a quick question (to which I suspect the answer is "no"): does anyone know if, in the ggplot2 package, there's a way to override the default names of the facets in facet_wrap (which correspond to the levels of the factor used to facet)? I know that I go back and change the levels of the fa

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread Jim Bouldin
No problem John, thanks for your help, and also thanks to Dan and Patrick. Wasn't able to read or try anybody's suggestions yesterday. Here's what I've discovered in the meantime: What I did not include yesterday is that my original data frame, called "data", was this: X Y V3 1 1 1 0.

[R] Categorizing Lines

2009-08-11 Thread Fabio Murtas
Hi all, i have a dataset of 3D coordinates and can't figure out how to' tell R which One Are the individuals: I have 3 columns which i named x,y and z And then i have 2607 Lines, but each specimen is 33 Lines (79 specimens) How can i tell R to' categorize individuals every 33 Lines? Thanks

[R] reading heterogeneous CSV

2009-08-11 Thread Allen S. Rout
Greetings, all. I've got a datafile I've been working with that has an ideosyncratic, heterogeneous format. It's grossly like: [...] DISKREAD,metadata about disks MEM,metadata about memory ,observation-identifier,time,date DISKREAD,observation-identifier,data about disks MEM,observation-

Re: [R] list indexing problem reading in files from a directory

2009-08-11 Thread stephen sefick
here is an intermediate solution that works just fine. Thank you all for your help. Stephen Sefick #level logger read in read.ll <- function(path){ library(chron) library(zoo) list.of.files <- list.files(path) length.files <- length(list.of.files) df <- vector(mode = "list", length = len

[R] Selecting/Accessing the last vector in a list of a list of data.frames

2009-08-11 Thread Bryan Hanson
Hello Again R Folks: I¹m trying to clean up some code. Suppose I have an object like this: > str(test) List of 2 $ G:List of 2 ..$ cls:'data.frame':101 obs. of 2 variables: .. ..$ V1: num [1:101] -0.0019 -0.0019 -0.00189 -0.00188 -0.00186 ... .. ..$ V2: num [1:101] 0.000206 0.000247

Re: [R] Need Advice: Considering Converting a Package from S3 to S4

2009-08-11 Thread Peter Dalgaard
Ben Bolker wrote: I can see that fortune("S4") is going to produce more than one possible response soon ... (is Achim Zeleis listening?) Ben In all fairness, it should probably be noted that quite a few people swear BY S4 in addition to those who swear AT it. -p Frank E Harrell J

[R] VIF for logit models

2009-08-11 Thread Tomas Zelinsky
Hello, I wonder whether it's possible to use vif{car} for binary logit models (estimated by using glm() function). And what about a case if all explanatory variables are binary as well? Is VIF still a good criterion for multicollinearity detection? Thanks a lot. Tomas

[R] Heteroscedasticity in binary logit models

2009-08-11 Thread Tomas Zelinsky
Hello, is there any tool to test heteroscedasticity in binary logit models? Thanks. Tomas __ 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

Re: [R] Categorizing Lines

2009-08-11 Thread John Kane
Do you just want to assign an identifier to each line, that is call the first 33 lines are speciman A the next are speciman b etc? Assuming the data set is in a data.frame called xx try something like this group <- rep(1:33, each=79) data.frame (group,xx) John --- On Tue, 8/11/09, Fabio Murta

[R] Prevent sequential repeated values in data frame column

2009-08-11 Thread Jon Zadra
Hi, I'm trying to randomize a sequence of trials for an experimental design. The trials consist of values for each of two factors. As is there are 30 combinations of the two factors, and I want them to be ordered randomly but with the requirement that for one of the factors, the value can n

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread Steve Lianoglou
Hi, See comments in line: On Aug 11, 2009, at 2:45 PM, Jim Bouldin wrote: No problem John, thanks for your help, and also thanks to Dan and Patrick. Wasn't able to read or try anybody's suggestions yesterday. Here's what I've discovered in the meantime: What I did not include yesterday

[R] R help from command line

2009-08-11 Thread Peng Yu
Hi, I frequently need to open multiple help pages in R, which requires the start of multiple R sessions. I am wondering if there is a way to invoke the help page from the command line just like 'man'. Regards, Peng __ R-help@r-project.org mailing list

[R] Data Mining Packages in R for categorical and numerical values

2009-08-11 Thread mmv.listservs
Hello, I''ve looked around and I can't seem to find a package to do data mining in R for a mixture of categorical and numerical attributes. If you have this data set: ## dummy data set.seed(123) dummy <- data.frame(A = sample(paste("tasks",1:100), 1,B = sample(paste("loads",1:100), 1,

[R] Paste symbol and calculation in plot

2009-08-11 Thread Jonathan R. Blaufuss
I'm trying to annotate a density plot and I would like to have R calculate the standard deviation and place it in the plot next to the standard deviation symbol "sigma". I can successfully use the text command to paste "StDev =",round(sd(Data),digits=3)) on the plot. However, I have trouble whe

Re: [R] Transform array in dataframe; melt(); reshape()

2009-08-11 Thread Patrick Connolly
On Tue, 11-Aug-2009 at 07:15PM +0100, Cecilia Carmo wrote: > Hi everyone. > > Could anyone help me to reshape my data? > > Reproducible example: > firm<-sort(rep(1:1000,10),decreasing=F) > year<-rep(1998:2007,1000) > industry<-rep(c(rep(1,10),rep(2,10),rep(3,10),rep(4,10),rep(5,10),rep(6,10),rep(7

Re: [R] R help from command line

2009-08-11 Thread Steve Lianoglou
Hi, On Aug 11, 2009, at 3:43 PM, Peng Yu wrote: Hi, I frequently need to open multiple help pages in R, which requires the start of multiple R sessions. I am wondering if there is a way to invoke the help page from the command line just like 'man'. I haven't been paying attention, but are yo

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread Bert Gunter
?with Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steve Lianoglou Sent: Tuesday, August 11, 2009 12:27 PM To: Jim Bouldin Cc: r-help@r-project.org Subject: Re: [R] problem selecting

[R] Is there a summary on different version of 'apply' functions? What is the meaning of the prefixes?

2009-08-11 Thread Peng Yu
Hi, There are quiet a few different 'apply' functions, such as lapply, sapply and many more. I'm very familiar with the 'Apply' function in Mathematica. Can somebody point me a summary of all the 'apply' functions in R. Also, I'm curious that what 'l' and 's' (and other prefixes) stand for in 'lap

[R] merge zoo objects contained in a list

2009-08-11 Thread stephen sefick
I would like to merge zoo objects that are stored in a list into one big zoo object with one index for all of the observations. I have created the list (74 dataframes) with the code below, and have tried the do.call(merge, foo) in the call and the output is not what I expected. Any help would be

Re: [R] Is there a summary on different version of 'apply' functions?What is the meaning of the prefixes?

2009-08-11 Thread Bert Gunter
?help.search help.search("apply") Problem is, various packages have added their own apply-type functions; so what you get depends on what packages you have downloaded. Bert Gunter Genentech Nonclinical Biostatisics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bou

[R] Contrasts within ANOVA frame

2009-08-11 Thread Jun Shen
Dear all, I was trying to do some contrasts within ANOVA. I searched the archive and found a clue posted by Steffen Katzner ( http://tolstoy.newcastle.edu.au/R/help/06/01/19385.html) I have three levels for a factor names "StdLot". I just want to make three comparisons, 1 vs 2, 1 vs 3 and 2 vs 3.

[R] re : R help from command line

2009-08-11 Thread romain . francois
Hello, I have this script in my PATH : #!/bin/env Rscript args <- commandArgs( TRUE ) if( length( args ) == 1 ){         h <- help( args ) } else if( length(args) == 2 ) {         h <- help( args[2] , package = args[1] ) } else{         stop( "usage: rman [package] functi

Re: [R] Heteroscedasticity in binary logit models

2009-08-11 Thread Alfredo
You might want to check vif in the Design package. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tomas Zelinsky Sent: Tuesday, August 11, 2009 3:20 PM To: r-help@r-project.org Subject: [R] Heteroscedasticity in binary logit models

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread Jim Bouldin
Yes, thanks Steve and also to everyone else for helping me clear this up. The issue was definitely the existence of other objects named X and Y that I inadvertently referred to in my command statement. Only when these objects are removed AND the data frame in question is attached, will the comman

Re: [R] Paste symbol and calculation in plot

2009-08-11 Thread Scott Sherrill-Mix
I'm no expert at this but it seems like ?plotmath is saying to do something like: text(2,0.35,bquote(sigma==.(mySigma),list('mySigma'=round(sd(Data),digits=3 Scott Scott Sherrill-Mix Department of Microbiology University of Pennsylvania 402B Johnson Pavilion 3610 Hamilton Walk Philadelphi

Re: [R] Paste symbol and calculation in plot

2009-08-11 Thread Jonathan R. Blaufuss
Scott, Thanks! That works great. I appreciate the help. Jonathan - Original Message - From: "Scott Sherrill-Mix" To: "Jonathan R. Blaufuss" Cc: r-help@r-project.org Sent: Tuesday, August 11, 2009 4:18:18 PM GMT -06:00 US/Canada Central Subject: Re: [R] Paste symbol and calculation in

Re: [R] Is there a summary on different version of 'apply' functions?What is the meaning of the prefixes?

2009-08-11 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Peng Yu > Sent: Tuesday, August 11, 2009 1:09 PM > To: r-h...@stat.math.ethz.ch > Subject: [R] Is there a summary on different version of > 'apply' functions?What is the meaning

[R] continuous-time Markov chain model with repeated measures

2009-08-11 Thread shin nakayama
Hi, Are there any way to include "repeated measures" components in Markov chain model? I am using msm package, but it doesn't allow to include repeated- measures. All I want to get is q matrix and the significance of the covariates in state transitions. Thanks

Re: [R] metaplot in rmeta: y-axis disappears

2009-08-11 Thread David Scott
Roaman wrote: Hi, I have a problem with the metaplot-function in rmeta. After plotting a Forest Plot with "metaplot", no y-axis is shown for normal plots anymore. Does someone know, why this is and how I can solve it? Thank you in advance! Kind regards, Roman This is a guess, because we

  1   2   >