[R] Wilcoxon test and grouping factor with multiple levels

2010-08-16 Thread Iurie Malai
Dear R users, I have a dataset with two variables: $esan - a grouping factor with 8 levels and $reus. I'd like to do wilcox.test on this dataset as sugested Weiwei here: https://stat.ethz.ch/pipermail/r-help/2007-July/136627.html. I tried to adapt his recommendation but no succes. Can anyone help

Re: [R] Learning ANOVA

2010-08-16 Thread Martin Maechler
> Liaw, Andy > on Mon, 16 Aug 2010 08:22:33 -0400 writes: > 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

Re: [R] About RedR and RKWard

2010-08-16 Thread Stephen Liu
Hi Rookie, You're running RedR on Linux OR on Windows? If on Windows whether you download it on its official website? Or on R ran; > install.packages("RedR") ? If on Linux whether you install RedR on repo? B.R. Stephen L - Original Message From: Rookie To: Stephen Liu Cc: r-h

[R] About RedR and RKWard

2010-08-16 Thread Stephen Liu
Hi folds, RedR - visual programming for R http://www.red-r.org/ Has any folk used RedR before? What will be the difference compared with; RKWard - GUI for R http://sourceforge.net/apps/mediawiki/rkward/index.php?title=Main_Page Screen Short http://sourceforge.net/apps/mediawiki/rkward/index.php

Re: [R] Changing latitude data to decimal degrees

2010-08-16 Thread Peter Alspach
Tena koe Sadz One way: tt <- c('122:45:45','-69:38:27') tt <- lapply(strsplit(tt,':'), as.numeric) lapply(tt, function(x) x[1]+((x[1]>0)-0.5)*(x[2]+x[3]/60)/30) To understand how this work you might need to break up the bits. HTH Peter Alspach > -Original Message- > From: r-help-b

Re: [R] Converting degree: minute: second data to decimal degree data, should be simple

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 7:27 PM, Sadz A wrote: > Hi All, > > I have location data set up as degrees: minutes: seconds (for example, > 122:45:45) I need to get this data into decimal degree form (122.7625). > > I know that I need to use the formula > > Decimal degrees = Degrees + (Minutes/60) + (Se

Re: [R] Converting degree: minute: second data to decimal degree data, should be simple

2010-08-16 Thread Bill.Venables
I take it you have the data in character form. If the DMS data is already in a data frame it is probably in factor form, so you will need to coerce it to character first. Here is how you could do it with the DMS data in a data frame: > m ## an example with 3 entries DMS 1 122:45:45 2

Re: [R] lmomRFA-package: regsimq()

2010-08-16 Thread J. R. M. Hosking
On 2010-08-16 03:49, Tonja Krueger wrote: 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: Fehl

Re: [R] A question of install R packages

2010-08-16 Thread hen chao Chang
On Aug 16, 2010, at 11:05 PM, hen chao Chang wrote: > > My R_version is 2.11.1. > I can’t install R packages. > The error massages are following: > > package 'DBI' successfully unpacked and MD5 sums checked > error in normalizePath(path) : > path[1]="E:\R-2.11.1\library/DBI"…… ... and were yo

[R] Singular error in rlm

2010-08-16 Thread uttara_n
I am absolutely new to R and I am aware of only a few basic command lines. I was running a robust regression in R, using the following command line library (MASS) rfmodel2 <- rlm (TotalEmployment_2005 ~ ALABAMA + MISSISSIPPI + LOUISIANA + TotalEmployment_2000 + PCWhitePop_2005 + UnemploymentRate_

[R] Changing latitude data to decimal degrees

2010-08-16 Thread Sadz A
Hi All, I have location data set up as degrees: minutes: seconds (for example, 122:45:45) I need to get this data into decimal degree form (eg, 122.7625). I know that I need to use the formula: Decimal degrees = Degrees + (Minutes/60) + (Seconds/3600) Does anyone know how I can get R to do t

[R] Specify decimal places for parameters in BUGS output

2010-08-16 Thread Anamika Chaudhuri
Hi All: I had a basic question to ask. I am running R2WinBUGS so that I could automate the running of my model using 1000 simulated datasets. Below is the code I am using. The only problem I am having is the bugs output that comes out shows my parameters as nos with 1 decimal place after. I would

[R] Converting degree: minute: second data to decimal degree data, should be simple

2010-08-16 Thread Sadz A
Hi All, I have location data set up as degrees: minutes: seconds (for example, 122:45:45) I need to get this data into decimal degree form (122.7625). I know that I need to use the formula Decimal degrees = Degrees + (Minutes/60) + (Seconds/3600) Does anyone know how I can get R to do this?

[R] Combining values from a data.frame row with matrix rownames.

2010-08-16 Thread Gil Gamesh
Hello, I am trying to iteratively build a build a panel of variables to discriminate between two groups. My starting position is a matrix of experimental data and I have a function that will work through all pairs of variables and produce sensitivities, specificities and p-values for each pair an

Re: [R] A question of install R packages

2010-08-16 Thread David Winsemius
On Aug 16, 2010, at 11:05 PM, hen chao Chang wrote: My R_version is 2.11.1. I can’t install R packages. The error massages are following: package 'DBI' successfully unpacked and MD5 sums checked error in normalizePath(path) : path[1]="E:\R-2.11.1\library/DBI"…… ... and were you running as

Re: [R] Independent variables omitted in lm and glm

2010-08-16 Thread elaine kuo
sorry I forget the attachments Dear List, > > > > Some independent variable were missing in calculation using lm and glm > (gaussian). > > (X= Y1+Y2+…..+Y16, Independent number: 16 variable) > > However, those variables did work well in cor(X, Y) respectively. > > str(dataframe) was also run to en

Re: [R] A question of install R packages

2010-08-16 Thread David Winsemius
On Aug 16, 2010, at 11:05 PM, hen chao Chang wrote: My R_version is 2.11.1. I can’t install R packages. The error massages are following: package 'DBI' successfully unpacked and MD5 sums checked error in normalizePath(path) : path[1]="E:\R-2.11.1\library/DBI"…… In Windoze all back-slashes

[R] A question of install R packages

2010-08-16 Thread hen chao Chang
My R_version is 2.11.1. I can’t install R packages. The error massages are following: package 'DBI' successfully unpacked and MD5 sums checked error in normalizePath(path) : path[1]="E:\R-2.11.1\library/DBI"…… -- View this message in context: http://r.789695.n4.nabble.com/A-question-of-ins

[R] Independent variables omitted in lm and glm

2010-08-16 Thread elaine kuo
Dear List, Some independent variable were missing in calculation using lm and glm (gaussian). (X= Y1+Y2+…..+Y16, Independent number: 16 variable) However, those variables did work well in cor(X, Y) respectively. str(dataframe) was also run to ensure that the variables were all numbers. Mor

Re: [R] AIC for model selection in Package â??Mu MInâ??

2010-08-16 Thread Ben Bolker
That's really too big a question to do justice to in a mailing list reply. If possible, consult a local expert. To keep it very short, I would say: (1) when you are interested in maximizing expected predictive accuracy (rather than testing hypotheses); (2) when the parameters in the mode

Re: [R] Learning ANOVA

2010-08-16 Thread Stephen Liu
- Original Message From: Robert Baer To: Stephen Liu ; r-help@r-project.org Sent: Tue, August 17, 2010 12:35:07 AM Subject: Re: [R] Learning ANOVA >>> modelfn(count ~ spray, data=test01) >> Error: could not find function "modelfn" >> >> What will be +var3 ? >I think the general advice

Re: [R] Lattice xyplots plots with multiple lines per cell

2010-08-16 Thread Juliet Hannah
You may want to check out examples in lattice and ggplot2. Both of these make plotting subsets much easier. I can't remember the lattice syntax off the top of my head, but if you post some example data – either by creating it or using dput – people will be able to help out easier. Here is some exa

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:07 PM, Gabor Grothendieck wrote: > On Mon, Aug 16, 2010 at 8:00 PM, skan 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. >

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:50 PM, skan 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 % code

Re: [R] About .RData

2010-08-16 Thread Stephen Liu
- Original Message From: Michael Dewey To: Duncan Murdoch ; Stephen Liu 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 shortcut when you did >>the install. (I believe that's the d

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 t

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:36 PM, skan 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 me an out of

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: http://r.

Re: [R] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 8:00 PM, skan 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 list. index.c

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 fr

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
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

Re: [R] print numbers

2010-08-16 Thread array chip
Marc, this works perfectly! Thanks John - Original Message From: Marc Schwartz To: William Dunlap Cc: array chip ; r-help@r-project.org Sent: Mon, August 16, 2010 3:23:33 PM Subject: Re: [R] print numbers Bill et al, See ?axTicks plot(3^(0:5), 0:5, log="x",axes=FALSE) > axTicks

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 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. N

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 real

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 100110

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 To: array chip Cc: r-h...@stat.math.ethz.ch Sent: Mon, August 16, 2010 2:53:37 PM Subject: Re: [R] identical() Hello, array chip wrote: > Hi, I am really puzzled by this. hop

Re: [R] identical()

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 5:47 PM, 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 10011

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 10

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 Me

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 ve

[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 1

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: http://r.789695.n4.nabble.com/print-numbers-tp2327378p

[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] when to use textConnection ??

2010-08-16 Thread Gabor Grothendieck
On Mon, Aug 16, 2010 at 1:40 PM, skan 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 in order to

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] 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 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] 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" "5""1""0.10" "0.05" > On Mon, 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. I

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 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 sugge

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

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 and

[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-hel

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 http://cran.r-project.org/web/packages/di

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 : > > On Au

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 diff

[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, v

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. To

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: http://r.789695.n4.nabble.com/h

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 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. There are two pointe

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] 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 R

[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 i

[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, rows=

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 sourc

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 oper

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

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 To: Stephen Liu Cc: r-help@r-project.org Sent: Sun, August 15, 2010 3:43:55 PM Subject: Re: [R] About .RData Furthermore can I run following command on R? r

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 Sent

[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: http://r.789695.n4.nabble.com/when-t

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] 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 ind

Re: [R] Learning ANOVA

2010-08-16 Thread Stephen Liu
- Original Message From: Erik Iverson To: Stephen Liu 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 ? > > This is just a generic

[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 Erik Iverson
Stephen Liu wrote: - Original Message From: "Liaw, Andy" To: Stephen Liu ; 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 + var3, data=df,

Re: [R] Learning ANOVA

2010-08-16 Thread Stephen Liu
- Original Message From: "Liaw, Andy" To: Stephen Liu ; 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 + var3, data=df, ...) Hi Andy, Than

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 per

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 = FALS

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

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 wrote: > Hello all, > > I'm kind of surprised that searching the archives and Googling haven't given > me a result for this...

Re: [R] R with CouchDB?

2010-08-16 Thread Barry Rowlingson
On Mon, Aug 16, 2010 at 12:40 PM, David Mitchell 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 one > to want 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 lar

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] AIC for model selection in Package â� �MuMInâ��

2010-08-16 Thread Ben Bolker
elaine kuo 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 think you'r

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 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%: > a_list=c(1,2,3,4) > b_list=c(1

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 looks

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] 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 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 Ista Zahn
Hi Hyunchul, See ?match -Ista On Mon, Aug 16, 2010 at 1: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 > >        [

[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) n1<-c

[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 th

[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

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 stats.ox.ac.uk> writes: > > > > > Here is how I do it: > > > > write(" > > model { > >for (year in 1:N) { > > D[year] ~ dpois(mu[year])

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 wrote: Dear all, I have a data frame with several columns,

[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 mailin

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 lm

[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 lo

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) >

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

  1   2   >