[R] convert a vector of words into a matrix

2008-07-24 Thread Daren Tan
How to convert the strings into matrix ? (strings - strsplit(c(1 2 3, 1 2, 1 3 4 5), ))[[1]][1] 1 2 3 [[2]][1] 1 2 [[3]][1] 1 3 4 5 _ Easily edit your photos like a pro with Photo Gallery. [[alternative HTML version

Re: [R] truncated normal

2008-07-24 Thread Berwin A Turlach
G'day all, On Wed, 23 Jul 2008 20:48:59 -0400 Duncan Murdoch [EMAIL PROTECTED] wrote: On 23/07/2008 8:17 PM, cindy Guo wrote: Yes, I know. I mean if I want to generate 100 numbers from N(0,1)I((0,1),(5,10)). There are two intervals (0,1) and (5,10). Then the function will give 50 numbers

[R] ggplot question

2008-07-24 Thread Williams Scott
I am trying to do something simple with ggplot. I wish to draw a density plot split by group, and fill each group with a different colour (and each with an alpha =0.25). I have tried a number of variations of the following, but cannot find a way to define the colour of the fill, its transparency

Re: [R] how can I write code to detect whether the machine is Windows or Linux?

2008-07-24 Thread Peter Dalgaard
Marc Schwartz wrote: It's always dangerous to say always, but in general, the use of: Path/To/File with *forward* slashes, will work on both Windows and Linux, including the use of relative paths. Also, notice the existence of file.path() and system.file(). (Other separators than

Re: [R] lmer model with continuos non normal response variable, transformation needed?

2008-07-24 Thread Christoph Scherber
Dear Arams, I would suggest to use lme() instead of lmer(), and then to use a variance function to model the heteroscedasticity in the within-group errors, such as: model.new=update(model,weights=varPower(form=~primary.covariate)) where model and model.new are lme fits, and primary.covariate

Re: [R] Functions similar to step() and all.effects() that work for lme() objects?

2008-07-24 Thread Christoph Scherber
Dear Jon, The function stepAIC() in Venable´s Ripley´s MASS library does the job. Best wishes Christoph Jon Zadra schrieb: Hello, I make frequent use of the *step()* and, for plotting, *all.effects() *functions for *lm()* objects. I am now doing more with *lme()* random effects models,

Re: [R] convert a vector of words into a matrix

2008-07-24 Thread Patrick Burns
And what should the matrix look like? Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and A Guide for the Unwilling S User) Daren Tan wrote: How to convert the strings into matrix ? (strings - strsplit(c(1 2 3, 1 2, 1 3 4 5), ))[[1]][1] 1 2 3

Re: [R] Functions similar to step() and all.effects() that work for lme() objects?

2008-07-24 Thread Prof Brian Ripley
On Thu, 24 Jul 2008, Christoph Scherber wrote: Dear Jon, The function stepAIC() in Venable´s Ripley´s MASS library does the job. Actually, it is extractAIC method in the MASS package that does the job for stepAIC() or step(), so if you attach MASS then step() should work. As for

Re: [R] convert a vector of words into a matrix

2008-07-24 Thread Daren Tan
I want the matrix to look like this: [,1] [,2] [,3] [,4] [1,] 1 2 3 [2,] 1 2 [3,] 1 2 4 5 I tried to use do.call(rbind, strings) but failed due to unequal row lengths. Date: Thu, 24 Jul 2008 09:35:21 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject:

[R] time zone - best way to shift hours

2008-07-24 Thread DCC
I frequently work with hourly data in GMT format, and ensure that any data I read into R are expressed in GMT through as.POSIXct(mydate, tz = GMT). I am interested in processing air pollution data in GMT where where peaks in emissions (say from road traffic sources) tend to occur at the same

Re: [R] convert a vector of words into a matrix

2008-07-24 Thread Wacek Kusnierczyk
Daren Tan wrote: I want the matrix to look like this: [,1] [,2] [,3] [,4] [1,] 1 2 3 [2,] 1 2 [3,] 1 2 4 5 I tried to use do.call(rbind, strings) but failed due to unequal row lengths. you can't {r,c}bind them because of different lengths. one way to reach the goal is to pad

[R] Coconut benchmark for R?

2008-07-24 Thread Imanpreet
Hello All, Could anybody point me out any port of Global Optimization Test Problems OR Constraint Satisfaction Test Problems part of Coconut[%] benchmark or other such similar benchmarks for R. [%] Coconut benchmark:

Re: [R] time zone - best way to shift hours

2008-07-24 Thread Prof Brian Ripley
On Thu, 24 Jul 2008, DCC wrote: I frequently work with hourly data in GMT format, and ensure that any data I read into R are expressed in GMT through as.POSIXct(mydate, tz = GMT). That makes no sense. POSIXct times are absolute times, not in any timezone. You can display them in any

[R] How to get rule number in arules

2008-07-24 Thread Daniel Wagner
 Dear R experts   I generated rules using apriori method in arules package. Though I can access rules using %in% function but I am unable to access a specific rule by its unique identifier number. I want to use rule number for further analysis..   Thanking you in advance.   Daniel Amsterdam

[R] Bootstraping GAMs: confidence intervals

2008-07-24 Thread Luis Reino
Dear R-Users, I am trying to apply a bootstrap to a GAM in order to calculate the 95% confidence intervals for a smooth curve obtained by the “plot.gam” function of the mgcv package. Nonetheless, I am getting some difficulties in transposing the results for the graphs. I used the following

Re: [R] convert a vector of words into a matrix

2008-07-24 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: Daren Tan wrote: I want the matrix to look like this: [,1] [,2] [,3] [,4] [1,] 1 2 3 [2,] 1 2 [3,] 1 2 4 5 I tried to use do.call(rbind, strings) but failed due to unequal row lengths. you can't {r,c}bind them because of different lengths.

[R] Problems with Rmpi and LAM 7.1.4

2008-07-24 Thread giuseppe1 . milicia
Guys, I'm running LAM 7.1.4 and R/Rmpi on a SuSE 9.3 box. When I do library(Rmpi) The whole thing crashes with the following message: - No SSI RPI modules said that they were available to run. This should only

[R] Interactive plot

2008-07-24 Thread Megh Dal
I have created following interactive plot : library(TeachingDemos) plott = function(x) { return(hist(rnorm(as.integer(1000, 10, x)), xlab=NA)) } tkexamp(plott, list(x=list('slider',from=1,to=40, resolution=0.1, init=2)), plotloc='top') Here everything works fine, but the problaem is

Re: [R] Just 2 more questions - for now!

2008-07-24 Thread stephen sefick
lm(x~y+z) this should work- I think On Thu, Jul 24, 2008 at 7:01 AM, Williams, Robin [EMAIL PROTECTED] wrote: Hi all, Thanks for the help with my previous post. I have just two more questions for the minute. I think I said in a previous post that I like to use the terminal, i.e. run

Re: [R] Interactive plot

2008-07-24 Thread Duncan Murdoch
On 7/24/2008 7:34 AM, Megh Dal wrote: I have created following interactive plot : library(TeachingDemos) plott = function(x) { return(hist(rnorm(as.integer(1000, 10, x)), xlab=NA)) } tkexamp(plott, list(x=list('slider',from=1,to=40, resolution=0.1, init=2)), plotloc='top') Here

[R] Problem with scatterplot3d example

2008-07-24 Thread Tom La Bone
I tried to run the following example from section 4.1.4 of the Scatterplot3d - an R package for Visualizing Multivariate Data vignette and got an error on the part that plots the regression plane: library(scatterplot3d) data(trees) s3d - scatterplot3d(trees, type = h, color = blue, + angle =

Re: [R] Just 2 more questions - for now!

2008-07-24 Thread Mark Difford
Hi Robin, I ... can't get lm to work despite reading the help. I can get it to work with a single explanatory variable, EG model - lm(data$admissions~data$maxitemp) I'll answer just the second of your questions. Advice: don't just read the help file, look at the examples and run them; look

[R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Kunzler, Andreas
Dear List, I ran into some trouble handling missing values. Assume 2 vectors (numeric) including NAs a - c(rep(seq(1,4),4),NA,NA) b - c(sample(1:2,14,replace=T),NA,NA,1,2) I want to replace the values of vector a that are smaller than 2 and larger than 3 into NAs only in case vector b equals 1

Re: [R] Just 2 more questions - for now!

2008-07-24 Thread Duncan Murdoch
On 7/24/2008 7:01 AM, Williams, Robin wrote: Hi all, Thanks for the help with my previous post. I have just two more questions for the minute. I think I said in a previous post that I like to use the terminal, i.e. run rterm.exe. On exiting the terminal, I am asked if I want to save the

Re: [R] Problem with scatterplot3d example

2008-07-24 Thread Duncan Murdoch
On 7/24/2008 8:02 AM, Tom La Bone wrote: I tried to run the following example from section 4.1.4 of the Scatterplot3d - an R package for Visualizing Multivariate Data vignette and got an error on the part that plots the regression plane: library(scatterplot3d) data(trees) s3d -

Re: [R] Interactive plot

2008-07-24 Thread Megh Dal
Thanks for this. Can you please explain me what are those MDI and SDI and the diff in laymans language? --- On Thu, 7/24/08, Duncan Murdoch [EMAIL PROTECTED] wrote: From: Duncan Murdoch [EMAIL PROTECTED] Subject: Re: [R] Interactive plot To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Date:

Re: [R] Is there an equivalent * operator?

2008-07-24 Thread Felix Andrews
If you really want to work with character strings, you could do something like data.s1 - data$date[grep(.*-Sep-.*, date)] (see ?regexp for more on pattern matching) but there are better ways to handle dates. You should convert the character strings into Date objects: see ?Date. And check out the

Re: [R] Just 2 more questions - for now!

2008-07-24 Thread john seers (IFR)
Q1: Have a look at: ?save ?save.image ?load Q2: I am not sure this is right: model-lm(data$admissions~data$maxitemp) Try and code a line that looks more like this with the variables the names of the columns in your data: model-lm(admissions ~ maxitemp + minitemp, data=data) Have a read

Re: [R] Interactive plot

2008-07-24 Thread Duncan Murdoch
On 7/24/2008 8:24 AM, Megh Dal wrote: Thanks for this. Can you please explain me what are those MDI and SDI and the diff in laymans language? Not really. Just try them both, the differences are obvious. Duncan Murdoch --- On Thu, 7/24/08, Duncan Murdoch [EMAIL PROTECTED] wrote: From:

Re: [R] Is there an equivalent * operator?

2008-07-24 Thread René Capell
Hi Robin, to answer your question: I think you are looking for a regular expression, have a look at regex(). In your particular case, where all the strings show the same structure, you can also use substr() to cut out the substring of interest. More generally, you could consider to convert

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Richard . Cotton
I ran into some trouble handling missing values. Assume 2 vectors (numeric) including NAs a - c(rep(seq(1,4),4),NA,NA) b - c(sample(1:2,14,replace=T),NA,NA,1,2) I want to replace the values of vector a that are smaller than 2 and larger than 3 into NAs only in case vector b equals 1

Re: [R] how to export .xls file with colorful cells?

2008-07-24 Thread Gabor Grothendieck
You didn't mention your OS but if its Windows then see: http://tolstoy.newcastle.edu.au/R/help/05/07/8950.html and try adding this line to that -- actually it gives me an error message (from Excel?) using Excel 2007 on Vista, RDCOMClient 0.92-0 and R version 2.7.1 RC (2008-06-16 r45949) but it

[R] how know the status of particular process

2008-07-24 Thread Kurapati, Ravichandra (Ravichandra)
Hi I have the process id, How can I know whether it is in active state or not Thanks K.Ravichandra [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] incrementing for loop by 2

2008-07-24 Thread Clark, Jennifer H
Dear List-serv members: How can I structure a for loop so that it will increment the counter by two using R? I am just looking for a simple example that shows where the incrementing part should go. Thanks! Jennifer -- Jennifer Hayes Clark Assistant Professor Department of Political Science

[R] How to delete duplicate cases?

2008-07-24 Thread Daniel Wagner
Dear R users,   I have a dataframe with lot of duplicate cases and I want to delete duplicate ones which have low rank and keep that case which has highest rank. e.g   df1   cno      rank 1  1342    0.23 2  1342    0.14 3  1342    0.56 4  2568    0.15 5  2568    0.89

Re: [R] how know the status of particular process

2008-07-24 Thread Duncan Murdoch
Kurapati, Ravichandra (Ravichandra) wrote: Hi I have the process id, How can I know whether it is in active state or not This is not an R question. Find out how to do it in your operating system (whatever that is), and do the same in R using system(). Duncan

Re: [R] How to delete duplicate cases?

2008-07-24 Thread Jorge Ivan Velez
Dear Daniel, Try this: x=read.table(textConnection(cno rank 1 13420.23 2 13420.14 3 13420.56 4 25680.15 5 25680.89),header=TRUE,sep=) x[cumsum(tapply(x$rank,x$cno,which.max)),] cno rank 3 1342 0.56 5 2568 0.89 HTH, Jorge On Thu, Jul 24, 2008 at 10:00 AM,

Re: [R] How to delete duplicate cases?

2008-07-24 Thread Henrique Dallazuanna
Try this: aggregate(x$rank, list(cno=x$cno), max) On 7/24/08, Daniel Wagner [EMAIL PROTECTED] wrote: Dear R users, I have a dataframe with lot of duplicate cases and I want to delete duplicate ones which have low rank and keep that case which has highest rank. e.g df1 cno rank

Re: [R] Weighted variance function?

2008-07-24 Thread Gavin Simpson
On Thu, 2008-07-24 at 02:25 +0530, Arun Kumar Saha wrote: There is a R function to calculate weighted mean : weighted.mean() under stats package. Is there any direct R function for calculating weighted variance as well? Here are two ways; weighted.var() is via the usual formula and

Re: [R] How to delete duplicate cases?

2008-07-24 Thread Erik Iverson
Daniel - First, use order() to arrange the data.frame into an appropriate format. Then, use duplicated() with the negation operator to get rid of the duplicated values. Daniel Wagner wrote: Dear R users, Â I have a dataframe with lot of duplicate cases and I want to delete duplicate ones

[R] Error - unable to load shared library

2008-07-24 Thread Youngik Yang
Hi, I'm trying to use fastICA package but I only get an error message like following. library(fastICA) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/lib/R/library/fastICA/libs/fastICA.so': /usr/lib/R/library/fastICA/libs/fastICA.so: undefined symbol:

[R] error with .dll file and RGtk2

2008-07-24 Thread paulandpen
Hi all, I am getting the following error message. Does somebody know what needs to happen here? I have tried re-installing the RGtk2 package and also downloading a .dll file and installing it in the RGtk2 file folder Error in dyn.load(x, as.logical(local), as.logical(now)) : unable

[R] [Fwd: Re: Coefficients of Logistic Regression from bootstrap - how to get them?]

2008-07-24 Thread Michal Figurski
Thank you Frank and all for your advices. Here I attach the raw data from the Pawinski's paper. I have obtained permission from the corresponding Author to post it here for everyone. The only condition of use is that the Authors retain ownership of the data, and any publication resulting from

Re: [R] How to delete duplicate cases?

2008-07-24 Thread Marc Schwartz
on 07/24/2008 09:00 AM Daniel Wagner wrote: Dear R users, I have a dataframe with lot of duplicate cases and I want to delete duplicate ones which have low rank and keep that case which has highest rank. e.g df1 cno rank 1 13420.23 2 13420.14 3 13420.56 4 2568

Re: [R] How to delete duplicate cases?

2008-07-24 Thread Patrizio Frederic
this works cno = c(rep(1342,times=3),rep(2568,times=2)) rank= c(.23,.14,.56,.15,.89) df1 = data.frame(cno,rank)[order(cno,rank),] cnou= unique(cno) ind = match(cno,cnou) where = tapply(rank,ind,length) where = cumsum(as.numeric(where)) df1[where,] regards, PF

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Kunzler, Andreas
Hy Richie, thank you for the quick response. Unfortunately my problems hold on. Once again: 2 vectors (numeric) including NAs My intention: I want to replace the values of vector a that are smaller than 2 and larger than 3 into NAs only in case vector b equals 1 a - c(rep(seq(1,4),4),NA,NA) b

[R] Help with which()

2008-07-24 Thread naw3
Hi, I'm using which to find the position of a value in my data table, and it is returning the correct position and the position of another number that differs by an extra decimal place. For example, when I do: where1-which(Operons==3573.1,arr.ind=TRUE) it returns the position of that number and

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-24 Thread Michal Figurski
Greg and all, Just another thought on bias and variability. As I tried to explain, I perceive this problem as a very practical problem. The equation, that is the goal of this work, is supposed to serve the clinicians to estimate a pharmacokinetic parameter. It therefore must be simple and

Re: [R] Help with which()

2008-07-24 Thread Erik Iverson
See http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f [EMAIL PROTECTED] wrote: Hi, I'm using which to find the position of a value in my data table, and it is returning the correct position and the position of another number that differs by an

Re: [R] Problem with scatterplot3d example

2008-07-24 Thread Uwe Ligges
Duncan Murdoch wrote: On 7/24/2008 8:02 AM, Tom La Bone wrote: I tried to run the following example from section 4.1.4 of the Scatterplot3d - an R package for Visualizing Multivariate Data vignette and got an error on the part that plots the regression plane: library(scatterplot3d)

Re: [R] error with .dll file and RGtk2

2008-07-24 Thread Prof Brian Ripley
On Fri, 25 Jul 2008, paulandpen wrote: Hi all, I am getting the following error message. Does somebody know what needs to happen here? I have tried re-installing the RGtk2 package and also downloading a .dll file and installing it in the RGtk2 file folder Error in dyn.load(x,

Re: [R] ggplot question

2008-07-24 Thread hadley wickham
On Thu, Jul 24, 2008 at 2:23 AM, Williams Scott [EMAIL PROTECTED] wrote: I am trying to do something simple with ggplot. I wish to draw a density plot split by group, and fill each group with a different colour (and each with an alpha =0.25). I have tried a number of variations of the

[R] What is wrong with this contrast matrix?

2008-07-24 Thread Christoph Scherber
Dear all, I am fitting a multivariate linear model with 7 response variables and 1 explanatory variable. The following matrix P: P - cbind( c(1,-1,0,0,0,0,0), c(2,2,2,2,2,-5,-5), c(1,0,0,-1,0,0,0), c(-2,-2,0,-2,2,2,2), c(-2,1,0,1,0,0,0), c(0,-1,0,1,0,0,0)) should consist of orthogonal

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Gabor Csardi
On Thu, Jul 24, 2008 at 04:45:14PM +0200, Kunzler, Andreas wrote: Hy Richie, thank you for the quick response. Unfortunately my problems hold on. Once again: 2 vectors (numeric) including NAs My intention: I want to replace the values of vector a that are smaller than 2 and larger than 3

Re: [R] What is wrong with this contrast matrix?

2008-07-24 Thread Ted Harding
On 24-Jul-08 15:30:57, Christoph Scherber wrote: Dear all, I am fitting a multivariate linear model with 7 response variables and 1 explanatory variable. The following matrix P: P - cbind( c(1,-1,0,0,0,0,0), c(2,2,2,2,2,-5,-5), c(1,0,0,-1,0,0,0), c(-2,-2,0,-2,2,2,2),

Re: [R] incrementing for loop by 2

2008-07-24 Thread Wacek Kusnierczyk
Clark, Jennifer H wrote: Dear List-serv members: How can I structure a for loop so that it will increment the counter by two using R? I am just looking for a simple example that shows where the incrementing part should go. Thanks! for (i in seq(start, end, by=2)) { ... } vQ

Re: [R] What is wrong with this contrast matrix?

2008-07-24 Thread Christoph Scherber
Dear Ted, Thanks for your help; is there any straightforward way to construct an orthogonal contrast matrix by hand? Of course contrasts(as.factor(letters[1:6])) would also do the job, but user-defined contrasts would make more sense. Ideally, I would like to have a function that tests for

Re: [R] Help with which()

2008-07-24 Thread Ben Bolker
Erik Iverson iverson at biostat.wisc.edu writes: See http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f naw3 at duke.edu wrote: I'm using which to find the position of a value in my data table [snip] For example, when I do:

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabor Csardi Sent: Thursday, July 24, 2008 8:39 AM To: Kunzler, Andreas Cc: r-help@r-project.org; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [R] NAs - NAs are not allowed in subscripted

Re: [R] Help with which()

2008-07-24 Thread Ted Harding
On 24-Jul-08 15:35:45, Erik Iverson wrote: See http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-the se-numbers-are-equal_003f That's not an applicable response: The difference between 3573.1 and 3573.15 is far too large for them to be confused by ==. Thr confusion only

Re: [R] Help with which()

2008-07-24 Thread Erik Iverson
Ben Bolker wrote: Erik Iverson iverson at biostat.wisc.edu writes: See http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f naw3 at duke.edu wrote: I'm using which to find the position of a value in my data table [snip] For example, when

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-24 Thread Bert Gunter
To quote (or as nearly so as I can) Einstein's famous remark: Make everything as simple as possible ... but no simpler Moreover, as possible here means maintaining fidelity to scientific validity, not simple enough for me to understand. So I don't think a physicist can explain relativistic

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Gabor Csardi
On Thu, Jul 24, 2008 at 09:30:54AM -0700, Nordlund, Dan (DSHS/RDA) wrote: [...] a - c(rep(seq(1,4),4),NA,NA) b - c(rep(seq(1,2),7),NA,NA,1,2) Andreas, what is wrong with a[ (a 2 | a 3) b==1 ] - NA ? Isn't this what you want? [...] As I mentioned in my response

[R] Dividing by 0

2008-07-24 Thread nmarti
I'm trying to calculate the percent change for a time-series variable. Basically the first several observations often look like this, x - c(100, 0, 0, 150, 130, 0, 0, 200, 0) and then later in the life of the variable they're are generally no more 0's. So when I try to calculate the percent

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-24 Thread Michal Figurski
What are the arguments against fidelity of this concept to scientific validity? The concept of predictive performance was devised by one of you, biostatisticians - not me! I accept the authoritative view of the person that did it, especially because I do understand it. When I think of it,

Re: [R] Dividing by 0

2008-07-24 Thread Robert Baer
I'm trying to calculate the percent change for a time-series variable. Basically the first several observations often look like this, x - c(100, 0, 0, 150, 130, 0, 0, 200, 0) and then later in the life of the variable they're are generally no more 0's. So when I try to calculate the percent

[R] Parallel Processing and Linear Regression

2008-07-24 Thread Alan Spearot
Does anybody have any suggestions regarding applying standard regression packages lm(), hccm(), and others within a parallel environment? Most of the packages I've found only deal with iterative processes (bootstrap) or simple linear algebra. While the latter might help, I'd rather not program

[R] R-package install

2008-07-24 Thread cindy Guo
Hi, I have a R package, which is a .tar.tar file. And it is said to be source code for all platforms. And the author said it should install on any system (but he didn't know about Windows). I am wondering if I can use this package in Windows R. Thank you, Cindy [[alternative HTML version

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: Gabor Csardi [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2008 9:59 AM To: Nordlund, Dan (DSHS/RDA) Cc: r-help@r-project.org Subject: Re: [R] NAs - NAs are not allowed in subscripted assignments On Thu, Jul 24, 2008 at 09:30:54AM -0700, Nordlund,

Re: [R] Help with which()

2008-07-24 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | Hi guys, | | Thank you all for looking at this, and I'm sorry - I was making a silly | mistake. | I was using a previous version of the data table in R, while looking at | a new | file in excel (its easier for me to view

Re: [R] How to get rule number in arules

2008-07-24 Thread Hans W. Borchers
As always, 'str(rules)' will provide you with a view on the internal structure of 'rules'. By the way, 'rules' is of class 'rules', see the rules-class entry in the ARULES help pages, with more explanations on the meaning of attributes. For example, '[EMAIL PROTECTED]' will show support,

Re: [R] incrementing for loop by 2

2008-07-24 Thread Marc Schwartz
on 07/24/2008 07:59 AM Clark, Jennifer H wrote: Dear List-serv members: How can I structure a for loop so that it will increment the counter by two using R? I am just looking for a simple example that shows where the incrementing part should go. Thanks! It would be helpful to have an idea of

[R] Problem with GLS dwtest function

2008-07-24 Thread mm745
Hi, I want to test for independence in my GLS model fitp2, but when I try to use the dwtest function in the lmtest library, I get the error message Error in terms.default(formula) : no terms component. The model and data set are below. Any suggestions would be really helpful! Thanks a lot in

Re: [R] [Fwd: Re: Coefficients of Logistic Regression from bootstrap - how to get them?]

2008-07-24 Thread Frank E Harrell Jr
Michal Figurski wrote: Thank you Frank and all for your advices. Here I attach the raw data from the Pawinski's paper. I have obtained permission from the corresponding Author to post it here for everyone. The only condition of use is that the Authors retain ownership of the data, and any

[R] Multinomial logistic regression with non-numerical data.

2008-07-24 Thread TL Vincent
Hi all, I have a set of data which looks similar to this (only way bigger!) linktyperegister F D a E D b R D c A T d D T a F D b . . . . . . and would like

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Gabor Csardi
On Thu, Jul 24, 2008 at 10:39:34AM -0700, Nordlund, Dan (DSHS/RDA) wrote: [...] Yes, it does help. I was misunderstanding how logical values are used for indexing. I assumed incorrectly that a value would be returned only if the index expression evaluated as TRUE. It would seem that the

Re: [R] factor question

2008-07-24 Thread Mark Difford
Hi Edna, Because I am always subsetting, I keep the following function handy mydata[] - lapply(mydata, function(x) if(is.factor(x)) x[,drop=T] else x) This will strip out all factor levels that have been dropped by a previous subsetting operation. For novice users of R (though I am not

[R] ggplot2 help

2008-07-24 Thread Edna Bell
Hi yet again! Thank you for being patient with me. Is there a how to for ggplot2, please? I would like to look at it, but have no idea where to start, please. Thanks, Edna Bell __ R-help@r-project.org mailing list

Re: [R] Dividing by 0

2008-07-24 Thread Rolf Turner
On 25/07/2008, at 5:24 AM, Robert Baer wrote: I'm trying to calculate the percent change for a time-series variable. Basically the first several observations often look like this, x - c(100, 0, 0, 150, 130, 0, 0, 200, 0) and then later in the life of the variable they're are generally

[R] Cairo graphics

2008-07-24 Thread Edna Bell
Hi again. Sorry to be a pest. What are Cairo graphics and how to find out about them, please? Thanks yet again, Edna __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-07-24 Thread John Kane
--- On Thu, 7/24/08, Michal Figurski [EMAIL PROTECTED] wrote: From: Michal Figurski [EMAIL PROTECTED] Subject: Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them? To: Cc: r-help@r-project.org r-help@r-project.org Received: Thursday, July 24, 2008, 11:02 AM

Re: [R] Subsetting an array by a vector of dimensions

2008-07-24 Thread Kenn Konstabel
Returning to the old question ... Is it possible to subset an n-dimensional array by a vector of n dimensions? On Sat, Jul 12, 2008 at 1:34 AM, Wolfgang Huber [EMAIL PROTECTED] wrote: do.call([, list(x,1,2,TRUE)) [1] 3 9 15 21 See also

Re: [R] Cairo graphics

2008-07-24 Thread Philipp Pagel
What are Cairo graphics and how to find out about them, please? http://www.google.de/search?hl=deq=cairo+graphics cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany

Re: [R] Question: how to build a subset to do separate calculations

2008-07-24 Thread Erik Iverson
Erik Iverson wrote: Spencer - Spencer wrote: Dear R Experts, I am trying to create several subsets that I want to use as separate datasets. After separate subsets are created for each country, I want to do some calculations for each. I did the following: data -

Re: [R] Should this PDF render correctly without font embedding?

2008-07-24 Thread stephen sefick
Mac OS X 10.3.5 R 2.7.1 works fine in the quartz window. Screwed up in Preview with the pdf device On Thu, Jul 24, 2008 at 4:29 PM, Jeffrey Horner [EMAIL PROTECTED] wrote: A professor here at Vanderbilt sent me the following code. Each of the text strings should right justify against the

[R] OT: course in research administration

2008-07-24 Thread Christopher W. Ryan
I'm currently enrolled in the distance education masters degree program in statistics at Texas AM University. I'm hoping the program will help me develop skills useful in advancing my primary care research endeavors. Having a great time so far, learning a lot. I have one semester in which to

Re: [R] R-package install

2008-07-24 Thread cindy Guo
Hi, Mark, Thank you for your response. No, I don't know how to compile it. Do I need to use unix to compile? After compiling, can I use it in Windows R? Attached is the package. Cindy On 7/24/08, Mark Difford [EMAIL PROTECTED] wrote: Hi Cindy, Hi, I have a R package, which is a .tar.tar

Re: [R] NAs - NAs are not allowed in subscripted assignments

2008-07-24 Thread Carl Witthoft
This may not be exactly what the OP wanted, but it may be easier to plow the original vectors a and b thru something like alogic -rle(!is.na(as.logical(a))) which returns a bunch of lengths and strings of TRUEs and FALSEs . Then play with alogic and blogic (created similarly to alogic),

Re: [R] Interactive plot

2008-07-24 Thread David Scott
Googling MDI gives a wikipedia entry in the first place which should explain things. David Scott On Thu, 24 Jul 2008, Duncan Murdoch wrote: On 7/24/2008 8:24 AM, Megh Dal wrote: Thanks for this. Can you please explain me what are those MDI and SDI and the diff in laymans language? Not

Re: [R] incrementing for loop by 2

2008-07-24 Thread Dimitris Rizopoulos
you can define the 'seq' argument of for() accordingly, e.g., for(i in seq(0, 20, 2)) print(i) I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

[R] still more dumb questions

2008-07-24 Thread Edna Bell
Hello. When I type in median, I get the following: median function (x, na.rm = FALSE) UseMethod(median) environment: namespace:stats How do I look at the code, please? Thanks again, Edna __ R-help@r-project.org mailing list

[R] Installing R packages in Textmate

2008-07-24 Thread Arthur Roberts
To Whom It May Concern: I need to use various packages in R and I also want to use Textmate. Problem 1: Textmate doesn't seem to recognize the packages that are already installed on R. Problem 2: When I execute the following command: install.packages(ade4,

[R] Odp: sum each row and output results

2008-07-24 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 23.07.2008 19:43:33: Hello, I have the following data frame (DF): V5V5.1V5.2 V5.3 V5.4 V5.5 2 -5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183 3 -5890.18905 -6019.84665 -6211.06545

[R] ANNOUNCE: rapache 1.1.0 release

2008-07-24 Thread Jeffrey Horner
Hello, First presented at DSC2005, rapache is a project supporting web application development using the R statistical language and environment and the Apache web server. The current release runs on UNIX/Linux and Mac OS X operating systems. http://biostat.mc.vanderbilt.edu/rapache/

Re: [R] Installing R packages in Textmate

2008-07-24 Thread Don MacQueen
Perhaps this has something to do with it... getOption(pkgType) [1] mac.binary whereas you have MacBinary. But binary is the default in OS X, so why specify it at all? Is there some reason why you need to specify both repos and contriburl in order to get ade4? A simple

Re: [R] how to export .xls file with colorful cells?

2008-07-24 Thread Marc Schwartz
on 07/23/2008 08:29 PM XinMeng wrote: Hi all: I wanna know how to expoort .xls file. And in the exported .xls file, how to set different cells with different color? Thanks a lot! My best. You don't indicate what operating system you are using and that is important as most of the relevant R

Re: [R] ggplot2 help

2008-07-24 Thread David Freedman
You might want to take a look at http://had.co.nz/ggplot2/ There are many examples of how to use this function. And, there's a book coming out soon. hope this helps david freedman Edna Bell wrote: Hi yet again! Thank you for being patient with me. Is there a how to for ggplot2,

[R] How to preserve the numeric format and digits ?

2008-07-24 Thread Daren Tan
Instead of m - c(4, 500) paste(A, m, B, sep=) [1] A4e+08B A5e+10B I want A4 and A500 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] How to preserve the numeric format and digits ?

2008-07-24 Thread Austin, Matt
paste(A, format(m, scientific=FALSE, trim=TRUE), B, sep=) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daren Tan Sent: Thursday, July 24, 2008 5:47 PM To: [EMAIL PROTECTED] Subject: [R] How to preserve the numeric format and digits ? Instead of m -

[R] simple random number generation

2008-07-24 Thread dxc13
useR's, I want to randomly generate 500 numbers from the standard normal distribution, i.e. N(0,1), but I only want them to be generated in the range -1.5 to 1.5. Does anyone have a simple way to do this? Thanks, dxc13 -- View this message in context:

  1   2   >