[R] Robust Regression + Stepwise

2010-08-16 Thread Shubha Vishwanath Karanth
Hi R, Can I perform a stepwise method for robust regression? In other words, how do I combine the methods step and rlm together? Thanks and Regards, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}} __

[R] lmomRFA-package: regsimq()

2010-08-16 Thread Tonja Krueger
Hi List! I’m using regsimq() from the “lmomRFA”-package to calculate error bounds for diverse distributions. For example: regsimq(gumfit$qfunc, nrec = lmom.data$n, f = lcdfgum, boundprob = c(0.025, 0.975)) Several times I got this error massage: Fehler in quantile.default(ou, probs =

[R] Random Number Generators and Sample

2010-08-16 Thread Linda Eaton
I am trying to get documentation about the random number generator used in sample. The help for sample does not mention it. Can anyone point me in the right direction. Thanks [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] reading a text file, one line at a time

2010-08-16 Thread Philipp Pagel
On Sun, Aug 15, 2010 at 10:58:51AM -0400, Data Analytics Corp. wrote: I have an upcoming project that will involve a large text file. I want to 1. read the file into R one line at a time 2. do some string manipulations on the line 3. write the line to another text file. You already

[R] need of elegant data manipulation

2010-08-16 Thread Benoit Boulinguiez
Dear R users, I seek for a more elegant manner to manipulate my data that that I produced so far. Data is in a data frame THC515.DATA -sample at the end of this mail- of 5 variables, a string and 4 continuous numeric variables. I need to get the mean of two variables Q and T at the levels of

Re: [R] Random Number Generators and Sample

2010-08-16 Thread Romain Francois
Le 16/08/10 09:35, Linda Eaton a écrit : I am trying to get documentation about the random number generator used in sample. The help for sample does not mention it. Can anyone point me in the right direction. Thanks Hi, You can follow the white rabbit into the code burrow. sample

Re: [R] Random Number Generators and Sample

2010-08-16 Thread Ted Harding
On 16-Aug-10 07:35:58, Linda Eaton wrote: I am trying to get documentation about the random number generator used in sample. The help for sample does not mention it. Can anyone point me in the right direction. Thanks The place the read all about it is ?RNG Agreed that ?sample gives no

Re: [R] need of elegant data manipulation

2010-08-16 Thread Dennis Murphy
Hi: Assuming I interpreted your intentions correctly, here are three different ways to get means of Q and T by combinations of dP and n. Your data were read into a data frame named dd. (Note that there are other ways to do this as well...) (1) aggregate(): with(dd, aggregate(cbind(Q, T) ~ dP +

[R] pvclust package

2010-08-16 Thread Holt, Hannah Rebecca
I have been using the pvclust package to perform hierarchical clustering with bootstrapped p-values. I am using it to compare the numbers of clusters identified between different datasets. However, the numbers are not comparable because pvclust calculates p-values for the optimal number of

[R] data frame handling

2010-08-16 Thread Lily_stats
Dear all, I have an xts object , t.xts with 4 columns: v1 DD1 v2 DD2 and created a data frame : t - as.data.frame(t.xts) I would like to extract data and create a new data frame for when the values in column DD1 falls between 0 and 30 and extract the corresponding v1 value. How can I do

Re: [R] How can I read date format '02-Jan-02' ?

2010-08-16 Thread Jim Lemon
On 08/16/2010 03:27 PM, Dong-Hee Koh wrote: Hello, I am trying to read a database exported from SAS. It is form of csv, and the date format reads '02-Feb-99'. I used following code to convert character to date format, db$dob-as.Date(db$dob, format=%d-%b-%y). but it doesn't work, only seems NA.

Re: [R] How can I read date format '02-Jan-02' ?

2010-08-16 Thread Jim Lemon
On 08/16/2010 08:22 PM, Jim Lemon wrote: On 08/16/2010 03:27 PM, Dong-Hee Koh wrote: Hello, I am trying to read a database exported from SAS. It is form of csv, and the date format reads '02-Feb-99'. I used following code to convert character to date format, db$dob-as.Date(db$dob,

[R] Strategy for maintaining R in student PC labs

2010-08-16 Thread Fiona Mary Underwood
Dear All At institutes where there are PC labs used by Masters and undergraduate students and software is maintained /managed by a central IT services, do you always update R every time a new version is released - around beginning of April and October? Do you also ask them to install all patch

[R] Finding a scalar value...

2010-08-16 Thread Petar Milin
Hello! I need to find a simple scalar value: Scal = ((1/R) - T) / (P - T), where R, T, and P are vectors in a data.frame. Please, can anyone tell me how to solve that in R? Best, PM __ R-help@r-project.org mailing list

[R] AIC for model selection in Package ‘MuMIn ’

2010-08-16 Thread elaine kuo
Dear List, Ben's recommendation to MuMIn is of great importance to research with over ten independent variables. However, the criteria in this package for model selection are AICc (second-order AIC) and QAIC (quasi-AIC). Please kindly share if it is possible to carry AIC rather than the metrics

Re: [R] Strategy for maintaining R in student PC labs

2010-08-16 Thread peter dalgaard
On Aug 16, 2010, at 12:39 PM, Fiona Mary Underwood wrote: Dear All At institutes where there are PC labs used by Masters and undergraduate students and software is maintained /managed by a central IT services, do you always update R every time a new version is released - around beginning

[R] When to use bootstrap confidence intervals?

2010-08-16 Thread Mark Seeto
Hello, I have a question regarding bootstrap confidence intervals. Suppose we have a data set consisting of single measurements, and that the measurements are independent but the distribution is unknown. If we want a confidence interval for the population mean, when should a bootstrap confidence

Re: [R] fGarch: how to use garchFit() in loop?

2010-08-16 Thread Yohan Chalabi
On Aug 15, 2010, at 11:14 PM, Marius Hofert wrote: Dear David, thanks for the quick response. Yes, I tried formula, but this gives the error Multivariate data inputs require lhs for the formula. library(fGarch) spec - garchSpec(model = list(alpha = 0.1, beta = c(0.4, 0.4))) data -

Re: [R] Games

2010-08-16 Thread Silvano
Hi, I want to thank all the suggestions sent, especially that of Hans. Thanks, -- Silvano Cesar da Costa Departamento de Estatística Universidade Estadual de Londrina Fone: 3371-4346 -- - Original Message -

Re: [R] Finding a scalar value...

2010-08-16 Thread Adaikalavan Ramasamy
You probably need to look up on how to write functions. Try scal.fn - function(P, R, T){ out - ( 1/R - T ) / ( P - T ) return(out) } Here is a fake example: df - cbind.data.frame( P=rnorm(10), R=rnorm(10), T=rnorm(10) ) scal.fn( df$P, df$R, df$T ) Or are you trying to solve other

Re: [R] ASCI characters

2010-08-16 Thread Orvalho Augusto
Thank you every one. Caveman On Mon, Aug 16, 2010 at 4:00 AM, David Winsemius dwinsem...@comcast.netwrote: To improve your further efforts at searching you should take note of the fact that it is ASCII, not ASCI. On Aug 15, 2010, at 8:50 PM, Orvalho Augusto wrote: Thank you!! Caveman

Re: [R] data frame handling

2010-08-16 Thread David Winsemius
On Aug 16, 2010, at 5:53 AM, Lily_stats wrote: Dear all, I have an xts object , t.xts with 4 columns: v1 DD1 v2 DD2 and created a data frame : t - as.data.frame(t.xts) t is not the best choice of names for an object because it is the name of a commonly used function Let's instead

Re: [R] Finding a scalar value...

2010-08-16 Thread Petar Milin
Thanks for the answer! However, if I would have scal.fn() like below, how would I apply uniroot() or optimize() or the like? Best, PM On 16/08/10 13:24, Adaikalavan Ramasamy wrote: You probably need to look up on how to write functions. Try scal.fn - function(P, R, T){ out - ( 1/R - T )

Re: [R] Learning ANOVA

2010-08-16 Thread Liaw, Andy
From: Stephen Liu Hi JesperHybel, Thanks for your advice. If you're trying to follow the youtube video you have a typing mistake here: InsectSprays.aov -(test01$count ~ test01$spray) I think this should be: InsectSprays.aov -aov(test01$count ~ test01$spray) Your advice

[R] lm prediction strange error

2010-08-16 Thread Trafim Vanishek
Dear all, I have an error in the simple prediction function for lm(). Maybe someone experienced the same? xma - matrix(data = 0, nrow = 100, ncol = 2) xma[, 1] - rnorm(100) xma[, 2] - rchisq(100, df = 3) m1 - lm(xma[, 1] ~ xma[, 2]) predict(m1, as.data.frame(seq(-13, 13, 0.5))) Thanks a lot,

Re: [R] lm prediction strange error

2010-08-16 Thread Dimitris Rizopoulos
better try it this way: DF - data.frame(y = rnorm(100), x = rchisq(100, df = 3)) m - lm(y ~ x, DF) predict(m, data.frame(x = seq(-13, 13, 0.5))) I hope it helps. Best, Dimitris On 8/16/2010 2:37 PM, Trafim Vanishek wrote: Dear all, I have an error in the simple prediction function for

[R] how to test if a vector contain a value?

2010-08-16 Thread Hyunchul Kim
Hi all, How to convert following simple python script to R if x in a_list: print x OR simply, how to test if a vector contain a value? Thank you in advance, Hyunchul [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] re-order the rows of a data frame accroding to a specified order of some column

2010-08-16 Thread l.mohammadikhankahdani
You can also write x[match(z,x[,2]),]. Leila on 2010/08/16 06:36 AM RICHARD M. HEIBERGER said the following: Yes, x[order(order(z)),] Two uses of order are needed, as shown. Rich On Sun, Aug 15, 2010 at 11:47 PM, Leon Yee yee.l...@gmail.com wrote: Dear all, I have a data frame

Re: [R] Including a text file (JAGS model) in an R package

2010-08-16 Thread Emmanuel Charpentier
Sorry for chiming in a tad late (I was incommunicado for two weeks) Le lundi 02 août 2010 à 18:50 +, Ben Bolker a écrit : Prof Brian Ripley ripley at stats.ox.ac.uk writes: Here is how I do it: write( model { for (year in 1:N) { D[year] ~ dpois(mu[year])

[R] R with CouchDB?

2010-08-16 Thread David Mitchell
Hello all, I'm kind of surprised that searching the archives and Googling haven't given me a result for this... I've got a large amount of data that is a good fit for CouchDB; it's reasonably unstructured, and such structure that exists is quite fluid. I want to slice the data in many different

[R] R and windows server memory limit

2010-08-16 Thread McEachron, Luke
I am running R 2.10.1 on Windows Server 03 in an effort to increase my memory limit. The memory limit on my machine is 4 gb and 8 gb on our server. However, when I run R within the server and try to increase my memory R still says I am limited to 4 gb. Any thoughts? Thank you in advance for

[R] xyplot - I can't find colors in my picture

2010-08-16 Thread Grzesiek
Hi, Anybody can tell me why I don't have colors in my picture? library(lattice) my.pch-c(17,16,15,18,20,9,10,12) my.fill-c('yellow','black','green','red','blue','cyan','magenta','pink') wzorzec1- c(1,3,2,4,6,4,2,3) wzorzec2- c(5,3,6,6,2,3,4,1) a-factor(wzorzec1) b-factor(wzorzec2)

Re: [R] how to test if a vector contain a value?

2010-08-16 Thread Ista Zahn
Hi Hyunchul, See ?match -Ista On Mon, Aug 16, 2010 at 1:06 PM, Hyunchul Kim hyunchul.kim@gmail.com wrote: Hi all, How to convert following simple python script to R if x in a_list:    print x OR simply, how to test if a vector contain a value? Thank you in advance, Hyunchul

Re: [R] how to test if a vector contain a value?

2010-08-16 Thread Henrique Dallazuanna
Try this: is.element(2, c(1, 2, 4)) On Mon, Aug 16, 2010 at 10:06 AM, Hyunchul Kim hyunchul.kim@gmail.comwrote: Hi all, How to convert following simple python script to R if x in a_list: print x OR simply, how to test if a vector contain a value? Thank you in advance,

Re: [R] how to test if a vector contain a value?

2010-08-16 Thread Marius 't Hart
mylist = c(1,2,3) if (any(mylist == 3)) { print(3) } [1] 3 On 08/16/2010 03:06 PM, Hyunchul Kim wrote: Hi all, How to convert following simple python script to R if x in a_list: print x OR simply, how to test if a vector contain a value? Thank you in advance, Hyunchul

Re: [R] When to use bootstrap confidence intervals?

2010-08-16 Thread Shentu
Just based on my limited understanding of bootstrapping and statistics in general, bootstrapping is effective but not magical - you can't reasonably expect any reliable inference to be drawn about the population based on a sample of 10, without any distributional assumptions. Your t interval

Re: [R] how to test if a vector contain a value?

2010-08-16 Thread Barry Rowlingson
On Mon, Aug 16, 2010 at 2:06 PM, Hyunchul Kim hyunchul.kim@gmail.com wrote: Hi all, How to convert following simple python script to R if x in a_list:    print x OR simply, how to test if a vector contain a value? if(any(a_list == x)){ print(x) } Or use %in%:

Re: [R] AIC for model selection in Package â� �MuMInâ��

2010-08-16 Thread Ben Bolker
elaine kuo elaine.kuo.tw at gmail.com writes: [re: MuMIn package] However, the criteria in this package for model selection are AICc (second-order AIC) and QAIC (quasi-AIC). Please kindly share if it is possible to carry AIC rather than the metrics above using this package. Thank you. I

Re: [R] R and windows server memory limit

2010-08-16 Thread Uwe Ligges
On 16.08.2010 15:07, McEachron, Luke wrote: I am running R 2.10.1 on Windows Server 03 in an effort to increase my memory limit. The memory limit on my machine is 4 gb and 8 gb on our server. However, when I run R within the server and try to increase my memory R still says I am limited to

Re: [R] R with CouchDB?

2010-08-16 Thread Dirk Eddelbuettel
On 16 August 2010 at 21:40, David Mitchell wrote: | Hello all, | | I'm kind of surprised that searching the archives and Googling haven't given | me a result for this... There is a project called 'R4CouchDB' on github: http://github.com/wactbprot/R4CouchDB Hth, Dirk | | I've got a

Re: [R] R with CouchDB?

2010-08-16 Thread Barry Rowlingson
On Mon, Aug 16, 2010 at 12:40 PM, David Mitchell monch1...@gmail.com wrote: What's the best way to go about extracting data from CouchDB databases, so that I can process it using R?  There don't seem to be any specific R modules for CouchDB, but I find it hard to believe that I'd be the first

Re: [R] R with CouchDB?

2010-08-16 Thread Whit Armstrong
http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2010:nosql_interface http://github.com/wactbprot/R4CouchDB On Mon, Aug 16, 2010 at 7:40 AM, David Mitchell monch1...@gmail.com wrote: Hello all, I'm kind of surprised that searching the archives and Googling haven't given me a

Re: [R] lm prediction strange error

2010-08-16 Thread Trafim Vanishek
Thanks a lot, Dimitris! I see - data should be defined precisely as data.frame. On Mon, Aug 16, 2010 at 2:47 PM, Dimitris Rizopoulos d.rizopou...@erasmusmc.nl wrote: better try it this way: DF - data.frame(y = rnorm(100), x = rchisq(100, df = 3)) m - lm(y ~ x, DF) predict(m, data.frame(x

Re: [R] How to invert a list ?

2010-08-16 Thread Carlos Petti
Do not worry, I found the solution. I had a list, as follows : x - list() x$i - 5 x$j - 9 x$k - 15 names(x$i) - a names(x$j) - b names(x$k) - b And I wanted to obtain a list, as follows : $a i 5 $b j k 9 15 My solution : n - sapply(x, names) m - sapply(x, c, use.names = FALSE) tapply(m,

Re: [R] When to use bootstrap confidence intervals?

2010-08-16 Thread Robert A LaBudde
1. Bootstrap will do poorly for small sample sizes (less than 25 or so). Parametric methods (t) have the advantage of working down to a sample size of less than 5. 2. You need to have the number of resamples reasonably large, say 10,000, for poorly behaved distributions. Otherwise extreme

Re: [R] Learning ANOVA

2010-08-16 Thread Stephen Liu
- Original Message From: Liaw, Andy andy_l...@merck.com To: Stephen Liu sati...@yahoo.com; r-help@r-project.org Sent: Mon, August 16, 2010 8:22:33 PM Subject: RE: [R] Learning ANOVA - snip - Well-written model fitting functions should be called like this: modelfn(var1 ~ var2 +

Re: [R] Learning ANOVA

2010-08-16 Thread Erik Iverson
Stephen Liu wrote: - Original Message From: Liaw, Andy andy_l...@merck.com To: Stephen Liu sati...@yahoo.com; r-help@r-project.org Sent: Mon, August 16, 2010 8:22:33 PM Subject: RE: [R] Learning ANOVA - snip - Well-written model fitting functions should be called like this:

[R] 2 not defined because of singularities appearing after introducing Fixed Effects

2010-08-16 Thread asdir
The set runs fine without the fixed effects. However, once I add the +factor(HostCode)-part, it throws out two variables. The africa-dummy thrown out certainly does not exhibit perfect multicollinearity, I checked that. The litrate variable is continuous and therefore cannot be perfectly related

Re: [R] Learning ANOVA

2010-08-16 Thread Stephen Liu
- Original Message From: Erik Iverson er...@ccbr.umn.edu To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Mon, August 16, 2010 11:41:34 PM Subject: Re: [R] Learning ANOVA modelfn(count ~ spray, data=test01) Error: could not find function modelfn What will be +var3 ?

[R] What does the function treeresponse from the praty package do exactly?

2010-08-16 Thread Verena Hoffmann
Hello R-list! I'm developing a prognostic model for a medical problem (event yes/no). So I used the patrty package and did a Random Forest: ctrl - cforest_unbiased(ntree=1000, mtry=3, minsplit=100) set.seed(675) rf - cforest( ph ~. , data=train, controls=ctrl) print(rf) and calculated the

Re: [R] Learning ANOVA

2010-08-16 Thread Robert Baer
modelfn(count ~ spray, data=test01) Error: could not find function modelfn What will be +var3 ? I think the general advice applied to your specific situation was meant to suggest using the construct: InsectSprays.aov - aov(count ~ spray, data=InsectSprays) rather than: InsectSprays.aov -

[R] when to use textConnection ??

2010-08-16 Thread skan
Hello. I don't uderstant when to use textConnection and when not. Some examples do it, some not. I've even seen something like con - textConnection(rev(rev(ReadLines('data.txt'))[-(1:2])) data - read.table(con) close(con) -- View this message in context:

Re: [R] merge function in R?

2010-08-16 Thread fishkbob
Thanks Chuck, I was trying to implement something more complicated than what I had to and after finding the reduce() function in bioconductor, everything went smoothly. Thanks again -- View this message in context: http://r.789695.n4.nabble.com/merge-function-in-R-tp2324684p2327133.html

Re: [R] About .RData

2010-08-16 Thread Michael Dewey
At 21:20 15/08/2010, Duncan Murdoch wrote: On 15/08/2010 10:24 AM, Stephen Liu wrote: - Original Message From: Michael Bedward michael.bedw...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sun, August 15, 2010 3:43:55 PM Subject: Re: [R] About .RData

Re: [R] when to use textConnection ??

2010-08-16 Thread Joshua Wiley
Hi, One useful case is when data is sent in an email. For instance: T1 T2 T3 -0.24 -0.26 -0.67 -1.58 0.04 0.14 -1.21 1.55 -0.45 0.31 0.48 -1.39 One could read it in via con - textConnection( T1 T2 T3 -0.24 -0.26 -0.67 -1.58 0.04 0.14 -1.21 1.55 -0.45 0.31 0.48 -1.39)

Re: [R] when to use textConnection ??

2010-08-16 Thread Matt Shotwell
Also, many R functions are designed to operate on R connections, to input and output text. Alternatively, we may wish to provide the input text as an R character vector, or output text to a character vector. The textConnection makes a character vector look like a connection, so R routines that

Re: [R] when to use textConnection ??

2010-08-16 Thread skan
OK, thanks Some time ago I asked in the forum how to read data from a file in order to use it with zoo. Someone suggested to use textConnection That's why I'm a little bit confused. I guess I don't need to use textConnection in order to read from files, it's just for text copied from other

[R] How to make flowchart in R?

2010-08-16 Thread johannes rara
I have a large dataset and I would like to make some kind of flowchart from this dataset. The idea is to show rowcounts from data subsets: data1 rows= 10 | / \ / \ males females,

[R] Type 3 sum of squares

2010-08-16 Thread Dennis Fisher
Colleagues, R 2.11.1, OS X. Please forgive my ignorance of some issues related to ANOVA. I am trying to replicate some SAS analyses that use type 3 sum of squares. The model that I am using is: lm(YVAR ~ DATA$SEQ + DATA$SEQ %in% DATA$ID + DATA$PERIOD + FRAME$FORMULATION) The intent

Re: [R] How to make flowchart in R?

2010-08-16 Thread fishkbob
http://cran.r-project.org/web/packages/diagram/vignettes/diagram.pdf It might be difficult to include very large amounts of data, but names and counts should be fine. -- View this message in context: http://r.789695.n4.nabble.com/How-to-make-flowchart-in-R-tp2327246p2327273.html Sent from the

Re: [R] How to make flowchart in R?

2010-08-16 Thread Marc Schwartz
On Aug 16, 2010, at 12:59 PM, johannes rara wrote: I have a large dataset and I would like to make some kind of flowchart from this dataset. The idea is to show rowcounts from data subsets: data1 rows= 10 | / \

Re: [R] Type 3 sum of squares

2010-08-16 Thread Liviu Andronic
Hello On Mon, 16 Aug 2010 11:17:41 -0700 Dennis Fisher fis...@plessthan.com wrote: Colleagues, R 2.11.1, OS X. Please forgive my ignorance of some issues related to ANOVA. This has already been discussed at length on this list. You might try searching the archives and using Rseek.

Re: [R] how to test if a vector contain a value?

2010-08-16 Thread Grzesiek
You have a lot of different way a-c(1,2,3,NA,3,4,3) is.na(a) [1] FALSE FALSE FALSE TRUE FALSE FALSE FALSE a==2 [1] FALSE TRUE FALSENA FALSE FALSE FALSE Look at here: http://cran.r-project.org/doc/manuals/R-intro.html -- View this message in context:

Re: [R] xyplot - I can't find colors in my picture

2010-08-16 Thread Chris Campbell
Dear Grzesiek Only pch 21 to 25 can be filled. Pairing fill with plot characters 1:20 will be ignored. You could try overlaying points to increase the number of unique colour/shape combinations. Cheers Chris Hadley Wickham, Creator of ggplot2 - teaching in the UK. 1st - 2nd November 2010.

[R] Problem with cast {reshape}: Error in match.fun(FUN) : could not find function Negate

2010-08-16 Thread Jock Currie
Dear All I'm having problem with some script which worked a few months ago (on a different computer that might well have had a different version of R installed, so perhaps it has to do with the old version of R?): library(reshape) Loading required package: plyr tble.data - melt.array(interp,

Re: [R] Problem with cast {reshape}: Error in match.fun(FUN) : could not find function Negate

2010-08-16 Thread Erik Iverson
Negate is in the base package, although apparently not in the prehistoric version of R you're using here! Updating to the latest R should work. Jock Currie wrote: Dear All I'm having problem with some script which worked a few months ago (on a different computer that might well have had a

Re: [R] How to make flowchart in R?

2010-08-16 Thread johannes rara
Thanks! My LaTeX knowledge is quite limited, I don't even know which one of these http://www.ucc.ie/cgi-bin/uncgi/ctan?term=PSTricks I should install to get PSTricks working. I have used TeXShop once or twice on my Mac. So, I maybe prefer plain R solution. -J 2010/8/16 Marc Schwartz

Re: [R] How to make flowchart in R?

2010-08-16 Thread Robert Baer
The R Journal article by Paul Murrell may be of interest: http://journal.r-project.org/2009-1/RJournal_2009-1_Murrell.pdf The documentation for the Diagram Package may also be of interest: http://cran.r-project.org/web/packages/diagram/diagram.pdf

[R] print numbers

2010-08-16 Thread array chip
Hi, When I plot, the axis ticks are printed as 50.00 25.00 10.00 1.00 0.05 0.01, is there any way to print them as 50 25 10 1 0.05 0.01 instead? Thanks John __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] How to make flowchart in R?

2010-08-16 Thread Marc Schwartz
Hi, If you should decide to pursue the LaTeX approach, you would want to install MacTeX on your Mac. More information here: http://www.tug.org/mactex/2009/ MacTeX is a self contained distribution of TeX Live 2009. It also provides an easy to use GUI based maintenance tool to add packages

Re: [R] print numbers

2010-08-16 Thread David Winsemius
On Aug 16, 2010, at 3:53 PM, array chip wrote: Hi, When I plot, the axis ticks are printed as 50.00 25.00 10.00 1.00 0.05 0.01, is there any way to print them as 50 25 10 1 0.05 0.01 instead? No example, so we don't even know which of the three plotting paradigms you might be

Re: [R] print numbers

2010-08-16 Thread array chip
sorry that I didn't give more details, thought it's going to be the same for all plots. It's the bxp() for boxplot. I have about couple of 10 such plots in a for() loop, so would like to automate the process. Using labels= certainly works, but it's manual work - plot by plot. Any other

Re: [R] print numbers

2010-08-16 Thread David Winsemius
On Aug 16, 2010, at 4:33 PM, array chip wrote: sorry that I didn't give more details, thought it's going to be the same for all plots. It's the bxp() for boxplot. I have about couple of 10 such plots in a for() loop, so would like to automate the process. Using labels= certainly works,

Re: [R] print numbers

2010-08-16 Thread jim holtman
How about this: x - c(50,25,5,1,.1,.05) ifelse(x = 1, sprintf(%.0f, x), sprintf(%.2f, x)) [1] 50 25 510.10 0.05 On Mon, Aug 16, 2010 at 4:33 PM, array chip arrayprof...@yahoo.com wrote: sorry that I didn't give more details, thought it's going to be the same for all plots.

Re: [R] print numbers

2010-08-16 Thread Henrique Dallazuanna
Try this: x - c(50,25,5,1,.1,.05) prettyNum(x) On Mon, Aug 16, 2010 at 4:53 PM, array chip arrayprof...@yahoo.com wrote: Hi, When I plot, the axis ticks are printed as 50.00 25.00 10.00 1.00 0.05 0.01, is there any way to print them as 50 25 10 1 0.05 0.01 instead? Thanks John

Re: [R] discerning species by color in cca biplot

2010-08-16 Thread Gavin Simpson
On Sat, 2010-08-14 at 21:17 +0800, elaine kuo wrote: Thanks I wanna to add the species labels in a cca biplot based on species and environment conditions (maybe sites are of less relevance here). 0. It would help your learning if you actually read the help pages for the functions I used,

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 1:40 PM, skan juanp...@gmail.com wrote: OK, thanks Some time ago I asked in the forum how to read data from a file in order to use it with zoo. Someone suggested to use textConnection That's why I'm a little bit confused. I guess I don't need to use textConnection

[R] R-2.11.1 Download: missing libRblas.so library

2010-08-16 Thread Katayoon Kasaian
Hello, I've been trying to use R-2.11.1 but I get the following error when trying to run R on linux: error while loading shared libraries: libRblas.so: cannot open shared object file: No such file or directory How can I solve this problem? Best, Katy

Re: [R] print numbers

2010-08-16 Thread Wu Gong
Hi John, formatC will do your work. Hope it helps. x - y - c(50.00,25.00,10.00,1.00,0.05,0.01) plot(x,y,log = xy,axes = F) axis(1, x, formatC(x)) axis(2, y, formatC(y)) Regards, Wu - A R learner. -- View this message in context:

[R] identical()

2010-08-16 Thread array chip
Hi, I am really puzzled by this. hope someone can help me I have a 2 small data frames a and b derived from a larger data frames. They look exactly the same to me, but identical() always returns FALSE. a a b 2 10011048 L 4 10011048 R 6 10011049 L 8 10011049 R b a b 1

Re: [R] R-2.11.1 Download: missing libRblas.so library

2010-08-16 Thread Erik Iverson
Katayoon Kasaian wrote: Hello, I've been trying to use R-2.11.1 but I get the following error when trying to run R on linux: error while loading shared libraries: libRblas.so: cannot open shared object file: No such file or directory How can I solve this problem? Did you install this

Re: [R] print numbers

2010-08-16 Thread array chip
Thank you all for the suggestions. They all worked. Now, those numbers on the ticks are produced by default plot function bxp(), i.e. they are different in each plot, is there any functions I can retrieve them so I can use formatC() or prettyNum() etc? Thanks again, John - Original

Re: [R] identical()

2010-08-16 Thread Erik Iverson
Hello, array chip wrote: Hi, I am really puzzled by this. hope someone can help me I have a 2 small data frames a and b derived from a larger data frames. They look exactly the same to me, but identical() always returns FALSE. a a b 2 10011048 L 4 10011048 R 6 10011049 L 8

Re: [R] identical()

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 5:47 PM, array chip arrayprof...@yahoo.com wrote: Hi, I am really puzzled by this. hope someone can help me I have a 2 small data frames a and b derived from a larger data frames. They look exactly the same to me, but identical() always returns FALSE. a         a b

Re: [R] identical()

2010-08-16 Thread array chip
Oops, I overlooked the row names. Sorry for my carelessness. Thanks - Original Message From: Erik Iverson er...@ccbr.umn.edu To: array chip arrayprof...@yahoo.com Cc: r-h...@stat.math.ethz.ch Sent: Mon, August 16, 2010 2:53:37 PM Subject: Re: [R] identical() Hello, array chip

Re: [R] identical()

2010-08-16 Thread Wu Gong
Hi John, They are different as Erik said. identical(a,b) [1] FALSE row.names(a) [1] 2 4 6 8 row.names(b) [1] 1 3 5 7 row.names(a) - NULL row.names(b) - NULL identical(a,b) [1] TRUE Regards, Wu array chip wrote: a a b 2 10011048 L 4 10011048 R 6 10011049 L 8

Re: [R] identical()

2010-08-16 Thread Jorge Ivan Velez
Hi, Take a look at this: identical(a,b) [1] FALSE all.equal(a,b) [1] Attributes: Component 2: 4 string mismatches rownames(a) - rownames(b) - NULL identical(a,b) [1] TRUE all.equal(a,b) [1] TRUE HTH, Jorge On Mon, Aug 16, 2010 at 5:47 PM, array chip wrote: Hi, I am really puzzled by

Re: [R] print numbers

2010-08-16 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of array chip Sent: Monday, August 16, 2010 2:54 PM To: Wu Gong; r-help@r-project.org Subject: Re: [R] print numbers Thank you all for the suggestions. They all worked. Now,

Re: [R] print numbers

2010-08-16 Thread Marc Schwartz
Bill et al, See ?axTicks plot(3^(0:5), 0:5, log=x,axes=FALSE) axTicks(1) [1] 1 2 5 10 20 50 100 200 axTicks(2) [1] 0 1 2 3 4 5 HTH, Marc Schwartz On Aug 16, 2010, at 5:17 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org

Re: [R] print numbers

2010-08-16 Thread array chip
Marc, this works perfectly! Thanks John - Original Message From: Marc Schwartz marc_schwa...@me.com To: William Dunlap wdun...@tibco.com Cc: array chip arrayprof...@yahoo.com; r-help@r-project.org Sent: Mon, August 16, 2010 3:23:33 PM Subject: Re: [R] print numbers Bill et al, See

Re: [R] when to use textConnection ??

2010-08-16 Thread skan
Gabor Grothendieck wrote: Note that zoo does have the read.zoo function which can read a file returning a zoo object. See help(read.zoo) . I know, but there are many different ways to read and I wanted to know what's the proper in my case. For example I've seen these ones, what's

Re: [R] AIC for model selection in Package â� �MuMInâ��

2010-08-16 Thread elaine kuo
Thanks for Ben. Model selection by AIC is feasible by the code below. One more question, when is it appropriate to carry out model averaging and parameter averaging? code library(MuMIn) data(Cement) lm1 - lm(y ~ ., data = Cement) dd - dredge(lm1, beta = TRUE, eval = TRUE, rank =

Re: [R] when to use textConnection ??

2010-08-16 Thread skan
I've just seen that sep sep cannot be , because there are not commas in the file. but I want it to take the first and second columns (date and time) as a whole, the index. -- View this message in context: http://r.789695.n4.nabble.com/when-to-use-textConnection-tp2327132p2327622.html Sent

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:00 PM, skan juanp...@gmail.com wrote: I've just seen that sep sep cannot be ,  because there are not commas in the file. but I want it to take the first and second columns (date and time) as a whole, the index. In the latest version of zoo index.column= can be a

Re: [R] when to use textConnection ??

2010-08-16 Thread skan
Error in .subset(x, j) : invalid subscript type 'list' Maybe is because I'm using Revolution Analytics and is based on an older version of R. I use it because I need to manage very big files and the common version of R shows me an out of memory error. -- View this message in context:

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:36 PM, skan juanp...@gmail.com wrote: Error in .subset(x, j) : invalid subscript type 'list' Maybe is because I'm using Revolution Analytics and is based on an older version of R. I use it because I need to manage very big files and the common version of R shows

Re: [R] when to use textConnection ??

2010-08-16 Thread skan
Oh, I got it with these code: tmp - read.table(file.txt) mydata - zoo(z$V3, as.chron(paste(z$V1,z$V2))) but that way I cannot specify the format of the date cheers -- View this message in context: http://r.789695.n4.nabble.com/when-to-use-textConnection-tp2327132p2327656.html Sent from the

Re: [R] About .RData

2010-08-16 Thread Stephen Liu
- Original Message From: Michael Dewey i...@aghmed.fsnet.co.uk To: Duncan Murdoch murdoch.dun...@gmail.com; Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Tue, August 17, 2010 12:50:51 AM Subject: Re: [R] About .RData - snip - You probably set the startup directory in the

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:50 PM, skan juanp...@gmail.com wrote: Oh, I got it with these code: tmp - read.table(file.txt) mydata - zoo(z$V3, as.chron(paste(z$V1,z$V2))) but that way I cannot specify the format of the date The default method of as.chron has a format= argument which uses the

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:07 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Mon, Aug 16, 2010 at 8:00 PM, skan juanp...@gmail.com wrote: I've just seen that sep sep cannot be ,  because there are not commas in the file. but I want it to take the first and second columns (date and

  1   2   >