Re: [R] Creating bibtex file of all installed packages?

2009-12-15 Thread Romain Francois
On 12/16/2009 08:32 AM, Achim Zeileis wrote: On Tue, 15 Dec 2009, Michael Friendly wrote: Achim and others: Achim's solution could be directly usable if it also added a BibTeX key, perhaps just the name of the package to the '@Manual{,' initial line of each. I wrapped the previous suggestions

Re: [R] Creating bibtex file of all installed packages?

2009-12-15 Thread Achim Zeileis
On Tue, 15 Dec 2009, Michael Friendly wrote: Achim and others: Achim's solution could be directly usable if it also added a BibTeX key, perhaps just the name of the package to the '@Manual{,' initial line of each. I wrapped the previous suggestions in a function, and played around with the co

[R] R graphics

2009-12-15 Thread dataguru
Graphics about... Bayesian ChemPhys Cluster Distributions Econometrics Environmetrics ExperimentalDesign Finance Genetics gR Graphics HighPerformanceComputing MachineLearning MedicalImaging Multivariate NaturalLanguageProcessing Optimization Pharmacokinetics Psychometrics Robust SocialSciences Spa

Re: [R] subtitle in Hmisc xYplot

2009-12-15 Thread David Winsemius
My apologies. I did look at both help pages before writing my commnets but I missed the sub entry. -- David On Dec 15, 2009, at 11:39 AM, Frank E Harrell Jr wrote: David Winsemius wrote: On Dec 14, 2009, at 7:09 PM, Joe King wrote: Ok so I am trying to add a subtitle to my xYplot using Hmisc

[R] probit with robust clustered errors?

2009-12-15 Thread John K. Williams
I attempted to use glmD from the Design library and then robcov to get robust clustered errors from a probit model, but see now that Design is not able to do this because "robcov needs the residuals method for the fitter to allow a type="score" or type="hscore" (for Efron's method) argument. Until

[R] How to find the significant digits of a number?

2009-12-15 Thread Xiang Wu
Is there a function in R that could find the significant digit of a specific number? Such as for 3.1415, return '5'? Thanks in advance. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Is there lazy copy in R?

2009-12-15 Thread Peng Yu
On Tue, Dec 15, 2009 at 2:34 PM, Peng Yu wrote: > 2009/12/15  : >> On Wed, 16 Dec 2009, Peng Yu wrote: >> >>> On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham >>> wrote: > > I don't understand what these addresses mean. Would you please help me > understand it? Did you try r

Re: [R] Read dataset in R language.

2009-12-15 Thread Peter Ehlers
Nancy, You really should read the help page for read.csv. Try this test <- read.csv2("testset.txt") Note the '2'. -Peter Nancy Adam wrote: Hi all, Thanks for the explanation I got other datasets that are already used with others but I got the same errors: “undefined columns selected” I att

Re: [R] Read dataset in R language.

2009-12-15 Thread ivan popivanov
Hi Nancy, testset.txt is using ";" as a field separator instead of the default ",", thus, you need to pass this information to R: tt = read.csv("testset.txt", sep=";") Hope this helps, Ivan > From: nancyada...@hotmail.com > To: r-help@r-project.org > Date: Wed, 16 Dec 2009 02:34:25

Re: [R] Reconstruct a dataset

2009-12-15 Thread Lisa
Thanks a lot for your help. As I mentioned in my second subscription, my problem is not generating the random number, but rewriting the original dataset based on the sets of random number, or indices. Lisa Lisa wrote: > > Dear all, > > I have a dataset that looks like this: > > inividual

Re: [R] Help in R

2009-12-15 Thread Charles C. Berry
On Tue, 15 Dec 2009, li li wrote: Thanks for the hint. I wrote the following: n <- 10 a <- 1 b<- 2 set.seed(1) y <- rnorm(n) xmat <- as.matrix( expand.grid( rep( list(0:1), n ) )) s <- numeric(2^(n)) for (i in 1:2^(n)){ + s[i]<- beta(a+rowSums(xmat)[i], b+n-rowSums(xmat)[i])* + prod((1-xmat

Re: [R] Reconstruct a dataset

2009-12-15 Thread Gray Calhoun
Hi Lisa, Look up indexing and random number generation. c(0,0,1,1) is not a random number. You can use sample to generate a random index, and index the dataset. I think that if you read the help pages (ie ?sample), you'll be able to use the code I sent you to get your results (I'll reproduce i

[R] R and Hierarchical Forecasting

2009-12-15 Thread zubin
Hello, does anyone know of any R routines capable of whats called Hierarchical Forecasting, reconciling the different hierarchies. Example: A top down forecast where the corporate forecast is created and then all the regions within the corporate entity are also forecasted, with the constraint the

Re: [R] Is there lazy copy in R?

2009-12-15 Thread tlumley
On Tue, 15 Dec 2009, Peng Yu wrote: 2009/12/15 : On Wed, 16 Dec 2009, Peng Yu wrote: On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham wrote: I don't understand what these addresses mean. Would you please help me understand it? Did you try reading the documentation?     When an object i

[R] Read dataset in R language.

2009-12-15 Thread Nancy Adam
Hi all, Thanks for the explanation I got other datasets that are already used with others but I got the same errors: “undefined columns selected” I attach the datasets with this email and this is the command I’m trying: train = read.csv("trainingset.txt",check.names=FALSE) test = read.csv("test

Re: [R] symbols plots - with circles

2009-12-15 Thread Jim Lemon
On 12/16/2009 08:47 AM, DispersionMap wrote: Im doing a plot where i look at clusters of data with circles indicating how big the cluster is: palette(rainbow(1000, end = 0.9)) symbols(data$lab, data$bak, circles = var21, main = "Circles Plot", fg = "grey", bg = 1:1000) As i have lots and lots

Re: [R] symbols plots - with circles

2009-12-15 Thread Jim Lemon
On 12/16/2009 08:47 AM, DispersionMap wrote: Im doing a plot where i look at clusters of data with circles indicating how big the cluster is: palette(rainbow(1000, end = 0.9)) symbols(data$lab, data$bak, circles = var21, main = "Circles Plot", fg = "grey", bg = 1:1000) As i have lots and lots

Re: [R] R question type in Moodle

2009-12-15 Thread Barry Rowlingson
On Tue, Dec 15, 2009 at 8:05 PM, David Kane wrote: > Moodle (www.moodle.org) is an open source course management system, a > competitor to Blackboard. I am writing several hundred R questions > that will be used within the quiz module in Moodle. Unfortunately, > Moodle does not have a built in que

Re: [R] read dataset in R language.

2009-12-15 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Nancy Adam > Sent: Tuesday, December 15, 2009 1:24 PM > To: r-help@r-project.org > Subject: Re: [R] read dataset in R language. > > > > Hi all,Thanks for your reply. Sorry I did

Re: [R] Reconstruct a dataset

2009-12-15 Thread Lisa
Supplement to my problem I know how to generate the random numbers, but I am not sure how to rewrite the dataset. In my example, for the first set of random number, rn1 <- c(0, 0, 1, 1), only the last two numbers are “1”s, not zeros, so I select the individual 3 and individual 4 from y original

Re: [R] Creating bibtex file of all installed packages?

2009-12-15 Thread Michael Friendly
Achim and others: Achim's solution could be directly usable if it also added a BibTeX key, perhaps just the name of the package to the '@Manual{,' initial line of each. I wrapped the previous suggestions in a function, and played around with the components, but can't quite see how to account f

Re: [R] Help in R

2009-12-15 Thread li li
Thanks for the hint. I wrote the following: > n <- 10 > a <- 1 > b<- 2 > set.seed(1) > y <- rnorm(n) > > xmat <- as.matrix( expand.grid( rep( list(0:1), n ) )) > > s <- numeric(2^(n)) > for (i in 1:2^(n)){ + s[i]<- beta(a+rowSums(xmat)[i], b+n-rowSums(xmat)[i])* + prod((1-xmat[i,])*dnorm(y,0,1)+xm

Re: [R] read dataset in R language.

2009-12-15 Thread Nancy Adam
Dear Phil, Thanks for your reply. I tried using: But this message appears: Error in scale(newdata[, object$scaled, drop = FALSE], center = object$x.scale$"scaled:center", : (subscript) logical subscript too long I also changed the separator but did not solve the problem many thanks,

[R] error when using multcomp and lm

2009-12-15 Thread chrischizinski
I am trying to use multcomp to do a Tukey posthoc on growth increments among genetic crosstypes. #Fixed effect model m1 <- lm(inc ~ 0 + Age+ Crosstype + Sex, data = Data.age) summary(m1) RESULTS of the model: summary(m1) Call: lm(formula = inc ~ 0 + Age + Crosstype + Sex, data = Data.age) Res

Re: [R] Structural Equation Models(SEM)

2009-12-15 Thread Jarrett Byrnes
Joerg Everman has a great solution to this. He changed the middle of the sem.mod code to include a variable, fit, and then used the following approach around where you define the objectives: if (fit=="ml") { objective.1 <- function(par){ A <- P <- matrix(0, m, m) val

Re: [R] read dataset in R language.

2009-12-15 Thread Phil Spector
Nancy - The separator in these files is the comma, not the semicolon. Try train = read.csv('trainingset.txt',check.names=FALSE) test = read.csv('testset.txt',check.names=FALSE) - Phil Spector Statistical Computin

[R] Reconstruct a dataset

2009-12-15 Thread Lisa
Dear all, I have a dataset that looks like this: inividual var1 var2 … 1 1 1 … 2 1 2 … 3 2 1 … 4 2 2 … … … … … I will random sample 2 individuals from this dataset based on a set of random

Re: [R] Counting in Matrix

2009-12-15 Thread Erik Iverson
?rowSums > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Tom Pitt > Sent: Tuesday, December 15, 2009 2:57 PM > To: r-help@r-project.org > Subject: [R] Counting in Matrix > > > Hi All, > > Is there an easy way to count "TRUEs

[R] Counting in Matrix

2009-12-15 Thread Tom Pitt
Hi All, Is there an easy way to count "TRUEs" for each row? Thanks, Tom x1x2x3x4 1 TRUE TRUE TRUE TRUE 2 FALSE TRUE TRUE TRUE 3 TRUE FALSE TRUE TRUE 4 FALSE FALSE TRUE TRUE 5 TRUE TRUE FALSE TRUE 6 FALSE TRUE FALSE TRUE 7 TRUE FALSE FALSE TRUE 8 FAL

[R] symbols plots - with circles

2009-12-15 Thread DispersionMap
Im doing a plot where i look at clusters of data with circles indicating how big the cluster is: palette(rainbow(1000, end = 0.9)) symbols(data$lab, data$bak, circles = var21, main = "Circles Plot", fg = "grey", bg = 1:1000) As i have lots and lots of data points to plot i get alot of circles.

Re: [R] Help in R

2009-12-15 Thread Charles C. Berry
On Tue, 15 Dec 2009, li li wrote: Hi: Thank you for your reply. I realize that I did not state the problem clearly before. Here is the problem again. Let X = (X1, X2, ..., Xn) and Y=(Y1,Y2,...,Yn). Xi's can be 0 or 1. When Xi=1, Yi is distributed as N(2,1). When Xi=0, Yi is distributed as N(

Re: [R] read dataset in R language.

2009-12-15 Thread Jason Morgan
Hello Nancy, I think you will need to provide more information if you hope to get useful advice from the list. For an idea of what should be sent, see the posting guide: http://www.R-project.org/posting-guide.html At a minimum, I suggest sending the code you are executing and a sample of the dat

[R] 'tracemem' question when I change the length of a vector

2009-12-15 Thread Peng Yu
Please see the following example. If I change the length of a vector twice below, I don't understand why 'tracemem' is shown in the first case but not the second case. Could somebody help explain it to me? > x=1 > tracemem(x) [1] "<0x1bad8c8>" > length(x)=100# The 'tracemem' string is shown as exp

[R] read dataset in R language.

2009-12-15 Thread Nancy Adam
Hi all, Could you please help me in solving the following error message: Error in `[.data.frame`(mytestdata, fp_temp == 1) : undefined columns selected when I use scan instead on read.table, I reicieve this message: Error in names(ret2) <- rowns : 'names' attribute [172] must be the same

[R] read dataset in R language.

2009-12-15 Thread Nancy Adam
Hi, Could you please help me in solving the following error message: Error in `[.data.frame`(mytestdata, fp_temp == 1) : undefined columns selected when I use scan instead on read.table, I reicieve this message: Error in names(ret2) <- rowns : 'names' attribute [172] must be the same

Re: [R] Is there lazy copy in R?

2009-12-15 Thread Peng Yu
2009/12/15 : > On Wed, 16 Dec 2009, Peng Yu wrote: > >> On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham >> wrote: I don't understand what these addresses mean. Would you please help me understand it? >>> >>> Did you try reading the documentation? >>> >>>     When an object is trac

Re: [R] Help in R

2009-12-15 Thread li li
Hi: Thank you for your reply. I realize that I did not state the problem clearly before. Here is the problem again. Let X = (X1, X2, ..., Xn) and Y=(Y1,Y2,...,Yn). Xi's can be 0 or 1. When Xi=1, Yi is distributed as N(2,1). When Xi=0, Yi is distributed as N(0,1). There are 2^n possible X valu

Re: [R] A Date related problem

2009-12-15 Thread Marc Schwartz
On Dec 15, 2009, at 2:19 PM, Marc Schwartz wrote: On Dec 15, 2009, at 1:39 PM, Megh wrote: Dear all, Please consider following date "as.Date("2009-02-01")". If I subtract "1" then it will give last day, similarly if I subtract "2" it will give 2nd last day. But what about if I want to g

Re: [R] expand.grid applied to a matrix

2009-12-15 Thread Charles C. Berry
On Tue, 15 Dec 2009, Jean-Christophe Domenge wrote: Dear R gurus, I'm looking for a way to expand a matrix to a data frame as detailed below: given a Matrix M with attribute dimnames=list(c("a","b"),c("u","v")), return a data frame df.M with df.M$row df.M$col df.M$val "a""u"

Re: [R] A Date related problem

2009-12-15 Thread Marc Schwartz
On Dec 15, 2009, at 1:39 PM, Megh wrote: Dear all, Please consider following date "as.Date("2009-02-01")". If I subtract "1" then it will give last day, similarly if I subtract "2" it will give 2nd last day. But what about if I want to get "last month", "2md last month" i.e. "2009-01-01

[R] R question type in Moodle

2009-12-15 Thread David Kane
Moodle (www.moodle.org) is an open source course management system, a competitor to Blackboard. I am writing several hundred R questions that will be used within the quiz module in Moodle. Unfortunately, Moodle does not have a built in question type for R. You can read about the different questions

[R] A Date related problem

2009-12-15 Thread Megh
Dear all, Please consider following date "as.Date("2009-02-01")". If I subtract "1" then it will give last day, similarly if I subtract "2" it will give 2nd last day. But what about if I want to get "last month", "2md last month" i.e. "2009-01-01" or "2008-12-01" etc or even year? Is there any a

Re: [R] Type III sum of square in ANOVA

2009-12-15 Thread Rolf Turner
On 16/12/2009, at 8:19 AM, ram basnet wrote: Dear all, Does some body have idea on how to extract Type III sum of Square from "lm" or "aov" function in R ? I could not figure out it. If this is minor and irrelevant to post in this mail, I am sorry for that. (1) Read Bill Venables' Exeg

[R] Type III sum of square in ANOVA

2009-12-15 Thread ram basnet
Dear all,   Does some body have idea on how to extract Type III sum of Square from "lm" or "aov" function in R ? I could not figure out it.   If this is minor and irrelevant to post in this mail, I am sorry for that. Thanks.     Sincerely, Ram Kumar Basnet Wageningen University, Netherlands  

Re: [R] Reference to R in Publication

2009-12-15 Thread Cedrick W. Johnson
My mistake... long day -c Peter Dalgaard wrote: Cedrick W. Johnson wrote: R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. I don't think it was a question, just a sighting. (I

Re: [R] Reference to R in Publication

2009-12-15 Thread Peter Dalgaard
Cedrick W. Johnson wrote: R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. I don't think it was a question, just a sighting. (I believe we're generating 1500+ citations per year acro

Re: [R] Reference to R in Publication

2009-12-15 Thread Cedrick W. Johnson
R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. -c Shawn Way wrote: Magazine: Pharmaceutical Manufacturing Date: Nov/Dec 2009 Title: What Your ICH Q8 Design Space Needs: A Multivar

[R] Reference to R in Publication

2009-12-15 Thread Shawn Way
Magazine: Pharmaceutical Manufacturing Date: Nov/Dec 2009 Title: What Your ICH Q8 Design Space Needs: A Multivariate Predictive Distribution Author: Peterson, John J. Company: GlaxoSmithKline Pharmaceuticals Summary: Multivariate Predicitive distibution quantifies the level of QA in a design sp

Re: [R] Is there lazy copy in R?

2009-12-15 Thread tlumley
On Wed, 16 Dec 2009, Peng Yu wrote: On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham wrote: I don't understand what these addresses mean. Would you please help me understand it? Did you try reading the documentation?     When an object is traced any copying of the object by the C     functi

Re: [R] Starting with R and distributions graphics

2009-12-15 Thread Andrea Fui
On Tue, Dec 15, 2009 at 6:37 PM, G. Jay Kerns wrote: > > Dear Andrea, > > On Tue, Dec 15, 2009 at 11:19 AM, Andrea Fui wrote: > > HI, i'm really new of R and i need some help. > > > > I have to describe some distributions for some dices throw: > > - launching 3 dices i need the distribution of th

[R] expand.grid applied to a matrix

2009-12-15 Thread Jean-Christophe Domenge
Dear R gurus, I'm looking for a way to expand a matrix to a data frame as detailed below: given a Matrix M with attribute dimnames=list(c("a","b"),c("u","v")), return a data frame df.M with df.M$row df.M$col df.M$val "a""u" M["a","u"] "b""v" M["b". "v

Re: [R] subtitle in Hmisc xYplot

2009-12-15 Thread Frank E Harrell Jr
David Winsemius wrote: On Dec 14, 2009, at 7:09 PM, Joe King wrote: Ok so I am trying to add a subtitle to my xYplot using Hmisc and I have some dummy code of x<-seq(1,10,1) y<-rev(seq(1,10,1))http://repair.att.com/repair/processing.do?processingJSP=TroubleDescription ci<-y*.10 ciupper<-y+ci

Re: [R] Starting with R and distributions graphics

2009-12-15 Thread G. Jay Kerns
Dear Andrea, On Tue, Dec 15, 2009 at 11:19 AM, Andrea Fui wrote: > HI, i'm really new of R and i need some help. > > I have to describe some distributions for some dices throw: > - launching 3 dices i need the distribution of the sum of the two higher > values > - launching 4 dices i need the dis

[R] Starting with R and distributions graphics

2009-12-15 Thread Andrea Fui
HI, i'm really new of R and i need some help. I have to describe some distributions for some dices throw: - launching 3 dices i need the distribution of the sum of the two higher values - launching 4 dices i need the distribution of the occurrences of the same value possibly i need a way to compa

Re: [R] Diagonal Labels on "Beside" Bars in Barplot

2009-12-15 Thread Jason Rupert
Marc, Thanks a ton.  That was it. Evidently I missed that the first time through the barplot.   I will be more diligent in reading the manuals. Thanks again, Jason   - Original Message From: Marc Schwartz To: Jason Rupert Cc: R Project Help Sent: Tue, December 15, 2009 7:48:

Re: [R] Instrumental Variables Regression

2009-12-15 Thread Achim Zeileis
On Tue, 15 Dec 2009, Jinsong Zhao wrote: Hi there, I hope to build a model Y ~ X1 + X2 + X3 + X4 with X1 has two instrumental variable A and B, and X2 has one instrumental variable A. I have searched the R site and mailling list, and known that the tsls() from sem package and ivreg() from AER p

Re: [R] Is there lazy copy in R?

2009-12-15 Thread Peng Yu
On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham wrote: >> I don't understand what these addresses mean. Would you please help me >> understand it? > > Did you try reading the documentation? > >     When an object is traced any copying of the object by the C >     function ‘duplicate’ or by arithm

Re: [R] Instrumental Variables Regression

2009-12-15 Thread John Fox
Dear Jinsong, I assume from your question that X3 and X4 are also available as instruments. Then, if you use tsls() in the sem package, you could formulate the model as tsls(Y ~ X1 + X2 + X3 + X4, instruments = ~ A + B + X3 + X4, data=yourData). See ?tsls for a similar example. It is, by the way,

[R] Instrumental Variables Regression

2009-12-15 Thread Jinsong Zhao
Hi there, I hope to build a model Y ~ X1 + X2 + X3 + X4 with X1 has two instrumental variable A and B, and X2 has one instrumental variable A. I have searched the R site and mailling list, and known that the tsls() from sem package and ivreg() from AER package can deal with instrumental variable r

Re: [R] Looking for categorization method/module in R

2009-12-15 Thread David Winsemius
On Dec 15, 2009, at 7:19 AM, James Mcininch wrote: All, I'm relatively new to using R, having used it thus far for some simple statistics and plotting. However, I'm not new to programming by any measure. I've been looking at the various modules available for clustering, factor analysis, etc.

Re: [R] subtitle in Hmisc xYplot

2009-12-15 Thread David Winsemius
On Dec 14, 2009, at 7:09 PM, Joe King wrote: Ok so I am trying to add a subtitle to my xYplot using Hmisc and I have some dummy code of x<-seq(1,10,1) y<-rev(seq(1,10,1)) ci<-y*.10 ciupper<-y+ci cilower<-y-ci this code works fine: xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points

Re: [R] R output

2009-12-15 Thread Manuel Jesús López Rodríguez
Thank you very much for your answers! They are very helpful! Best wishes! Manuel El 15/12/2009, a las 15:24, David Winsemius escribió: > The two other responses I saw suggested using write.table, which is fine if > the object is a data.frame, but maybe not so great if the object comes from > s

Re: [R] R output

2009-12-15 Thread David Winsemius
The two other responses I saw suggested using write.table, which is fine if the object is a data.frame, but maybe not so great if the object comes from summary on a model or aov. My memory from years gone by of Excel's handling of material that had been copied to the clipboard from webpage

Re: [R] different randomForest performance for same data

2009-12-15 Thread Liaw, Andy
You need to be _extremely_ careful when assigning levels of factors. Look at this example: R> x1 = factor(c("a", "b", "c")) R> x2 = factor(c("a", "c", "c")) R> x3 = x2 R> levels(x3) <- levels(x1) R> x3 [1] a b b Levels: a b c I'll try to add more proofing in the code... Andy > -Origi

Re: [R] subtitle in Hmisc xYplot

2009-12-15 Thread Frank E Harrell Jr
This is now fixed. Type getLatestSource('xYplot') to override the distributed version with the fixed version. -Frank Joe King wrote: Ok so I am trying to add a subtitle to my xYplot using Hmisc and I have some dummy code of x<-seq(1,10,1) y<-rev(seq(1,10,1)) ci<-y*.10 ciupper<-y+ci c

Re: [R] Random numbers for a group

2009-12-15 Thread Ted Harding
On 15-Dec-09 13:35:36, Jorge Ivan Velez wrote: > Dear Maithili, > Here are two suggestions: > ># data set > x <- read.table(textConnection("Name no_of_instances > AAA 12 > AA17 > A 0 > BBB 11 > BB 6 > B 0 > C 8 > D 3"), header = TRUE) > closeAllConnections() > x >

Re: [R] extracting vectors from lists of lists

2009-12-15 Thread David Winsemius
On Dec 14, 2009, at 11:55 AM, Jennifer Young wrote: This is just the thing. The former version I would never have guessed, but the function(x) version is much more intuitive. Does there exist some section of some manual where these sorts of things are explained? I find that figuring out h

Re: [R] Diagonal Labels on "Beside" Bars in Barplot

2009-12-15 Thread Marc Schwartz
On Dec 14, 2009, at 10:34 PM, Jason Rupert wrote: My question is based on an example provided in the following: Referencing: Statistics with R Vincent Zoonekynd 6th January 2007 URL: http://zoonek2.free.fr/UNIX/48_R/all.html data(HairEyeColor) a <- as.table( apply(HairEyeColor, c(1,2), sum)

Re: [R] shading between to curves that intersect repeatedly

2009-12-15 Thread Peter Dalgaard
BJ Manz wrote: > Dear R-Community, > > I have the following problem and was wondering whether someone could help > me out. I have a number of time series of discharge (up to 3000 data > points in some cases) which I would like to compare on the same line plot > by shading the area between some of

Re: [R] Random numbers for a group

2009-12-15 Thread Jorge Ivan Velez
Dear Maithili, Here are two suggestions: # data set x <- read.table(textConnection("Name no_of_instances AAA 12 AA17 A 0 BBB 11 BB 6 B 0 C 8 D 3"), header = TRUE) closeAllConnections() x # option 1 do.call(c,with(x, tapply(no_of_instances, Name, runif))) # option

Re: [R] for loop for automatic pdf generation

2009-12-15 Thread stephen sefick
Sorry for not reading the FAQ- that solved the problem. #loop to spit out PDFs list.names <- as.character(unique(braggxsec[,"Creek"])) pdf("~/Desktop/base_pdf_xsec/braggxsec.pdf") for(i in 1:length(list.names)){ f <- qplot(measurment_num, value , data=subset(braggxsec.melt, Creek==list.names[i]),

Re: [R] comparison of these types is not implemented

2009-12-15 Thread Jim Holtman
you need: r_squared[[i]] What is the problem you are trying to solve? Sent from my iPhone. On Dec 15, 2009, at 2:29, Tom Pitt wrote: Hi All, Can you tell me why I get the error message below? It's driving me nuts. Thanks, Tom r_squared [[1]] [1] 0.9083936 [[2]] [1] 0.8871647 [[3

[R] Random numbers for a group

2009-12-15 Thread Maithili Shiva
Dear R helpers I have following table Name no_of_instances    AAA                             12                                AA                               17                                A                                  0                              

[R] Looking for categorization method/module in R

2009-12-15 Thread James Mcininch
All, I'm relatively new to using R, having used it thus far for some simple statistics and plotting. However, I'm not new to programming by any measure. I've been looking at the various modules available for clustering, factor analysis, etc. and find that I need advice on which modules I should b

[R] Looking for categorization method/module in R

2009-12-15 Thread James Mcininch
All, I'm relatively new to using R, having used it thus far for some simple statistics and plotting. However, I'm not new to programming by any measure. I've been looking at the various modules available for clustering, factor analysis, etc. and find that I need advice on which modules I should b

Re: [R] for loop for automatic pdf generation

2009-12-15 Thread ONKELINX, Thierry
Dear Stephen, You need to print() the plot explicitly. This is FAQ 7.22 (http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis -graphics-not-work_003f) HTH, Thierry ir. Thierry Onkelinx Instituut vo

Re: [R] comparison of these types is not implemented

2009-12-15 Thread ONKELINX, Thierry
Dear Tom, r_squared is a list of vectors and not a vector. Use r_squared[[i]] instead of r_squared[i] or convert r_squared to a vector with unlist(r_squared) HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur-

[R] for loop for automatic pdf generation

2009-12-15 Thread stephen sefick
I know this is not reproducible, but I don't want to clog up mail boxes with the data frame. I would be happy to send this off list. I am sure that I am missing something simple. The plotting works if I just paste the call to qplot into R and replace the [i] with a number. Thanks for all of you

[R] shading between to curves that intersect repeatedly

2009-12-15 Thread BJ Manz
Dear R-Community, I have the following problem and was wondering whether someone could help me out. I have a number of time series of discharge (up to 3000 data points in some cases) which I would like to compare on the same line plot by shading the area between some of them. Can anyone tell me h

[R] comparison of these types is not implemented

2009-12-15 Thread Tom Pitt
Hi All, Can you tell me why I get the error message below? It's driving me nuts. Thanks, Tom > r_squared [[1]] [1] 0.9083936 [[2]] [1] 0.8871647 [[3]] [1] 0.8193883 [[4]] [1] 0.728157 [[5]] [1] 0.8849525 [[6]] [1] 0.8459416 [[7]] [1] 0.6702318 [[8]] [1] 0.02997816 [[9]] [1] 0.8974268

Re: [R] [Fwd: snowfall on Win7]

2009-12-15 Thread Jochen Knaus
Dear Ola, I cannot say anything about Windows 7, as we do not have any Win7 machines here in our institute and I even do not know someone who have Win7 on a private machine. I will try to find a machine with this OS and test it. Anybody having experiences with Win7 yet? Greetings Jo >

[R] Corrado's Rank Test implemented in R?

2009-12-15 Thread Andreas Klein
Dear R users. Does anyone know a package where the non-parametric rank test from Corrado (A nonparametric test for abnormal security-price performance in event studies, Charles J. Corrado, 1989, Journal of Financial Economics) for event studies is implemented? Sincerely Andreas. __

Re: [R] match problem

2009-12-15 Thread Jim Holtman
?merge What is the problem you are trying to solve? Sent from my iPhone. On Dec 15, 2009, at 4:50, "Bunny, lautloscrew.com" > wrote: Hi all, I dont know if match is the right approach here. I´d like to match t o data.frames. One big dataframe and one small dataframe. In SQL, wh at i want

Re: [R] write.csv and header

2009-12-15 Thread Gustaf Rydevik
On Mon, Dec 14, 2009 at 4:37 PM, Walther, Alexander < awaltherm...@googlemail.com> wrote: > Dear list, > > I would like to export a matrix to a TXT-File by using write.csv (not > necessarily). Is there a way to add a header (with additional > informations concerning the project) spanning multiple

[R] Changing Column names in (Output) csv file

2009-12-15 Thread Amelia Livington
Dear R helpers   Following is a part of R code.   data_lab <- expand.grid(c("R11", "R12", "R13"), c("R21", "R22", "R23"), c("R31", "R32", "R33"), c("R41", "R42", "R43"), c("R51", "R52", "R53"), c("R61", "R62", "R63"), c("R71", "R72", "R73"), c("R81", "R82", "R83"),  c("R91", "R92", "R93"), c("R

[R] match problem

2009-12-15 Thread Bunny, lautloscrew.com
Hi all, I dont know if match is the right approach here. I´d like to match to data.frames. One big dataframe and one small dataframe. In SQL, what i want to do what only be simple relation. The first consists of two columns a) some value b) some key that is explained in the other dataframe.

[R] Connect to internet

2009-12-15 Thread bergarog
Hi Another way is to set the following environmental variable in windows and use standard internet in R. Variable name: http_proxy Variable value: ...eg http://web.yourproxy.com:8080 Best regards, Roger [[alternative HTML version deleted]] ___

[R] user-written splits in rpart

2009-12-15 Thread Verspagen B (ALGEC)
Hi, I am trying to write my own split function for rpart. The aim is to do, instead of anova, a linear regression to determine the split (minimize some criterion like sum of rss left and right of the split). The regression (lm) should simply use the dependent and independent variables passed to

Re: [R] Connect to internet

2009-12-15 Thread Millo Giovanni
(Assuming you are on Windows) Some time ago, with R-2.9.1 on WinXP, I had success adding the --internet2 option to the program call in the shortcut to R on my desktop, like this: - open the shortcut - in the "destination" tab, which should read like: "c:\Program files\R\R-x.x.x\bin\Rgui.exe", add "

Re: [R] R CMD check in Vista

2009-12-15 Thread Uwe Ligges
Install the Rtools as described in R Installation and Administration. Uwe Ligges Juliet Ndukum wrote: I used R CMD check in windows vista, and it gives me the message 'sh' is not recognized as an internal or external command. How do I get around this, your help would be highly appreciated.

[R] snowfall on Win7

2009-12-15 Thread Ola Olsson
Dear list, Does the snowfall package work under Windows 7? Recently I upgraded from Windows Vista to Windows 7, and at the same time upgraded R from 2.8.1 to 2.10. On my machine (Intel i7 based) snowfall worked perfectly on my previous installation, but after the upgrade the same scripts do n

[R] R CMD check in Vista

2009-12-15 Thread Juliet Ndukum
I used R CMD check in windows vista, and it gives me the message 'sh' is not recognized as an internal or external command. How do I get around this, your help would be highly appreciated. [[alternative HTML version deleted]] __ R-help

[R] Full Professor Position at LMU Munich

2009-12-15 Thread Friedrich Leisch
Dear useRs, the Department of Statistics of the Ludwig-Maximilians-University Munich offers a position as Professor (W3) for Statistics and its Applications in Economics, Business and Social Sciences. R plays a central role both in teaching and research at our department, hence we would especiall

Re: [R] Odp: Loop counter used in variable

2009-12-15 Thread Petr PIKAL
Hi Martin Maechler napsal dne 15.12.2009 09:17:55: > > "PP" == Petr PIKAL > > on Tue, 15 Dec 2009 09:03:11 +0100 writes: > > PP> Hi > PP> r-help-boun...@r-project.org napsal dne 15.12.2009 00:25:10: > > >> > >> Hi All, > >> > >> I need to run muliple lm

Re: [R] Literature analysis

2009-12-15 Thread Schwan
OK this does work: I can subtract eg the titles. But how can I say R that it should make a link between title, keyword and frequency of the keywords in order to have a 3 d plot? Thanks a lot for helping me until here anyway! Cheers On Mon, 2009-12-14 at 16:15 +0100, Romain Francois wrote: >

Re: [R] Odp: Loop counter used in variable

2009-12-15 Thread Martin Maechler
> "PP" == Petr PIKAL > on Tue, 15 Dec 2009 09:03:11 +0100 writes: PP> Hi PP> r-help-boun...@r-project.org napsal dne 15.12.2009 00:25:10: >> >> Hi All, >> >> I need to run muliple lm functions. My independent variables are called >> dataset$x1, x2, x3,

[R] Odp: Loop counter used in variable

2009-12-15 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 15.12.2009 00:25:10: > > Hi All, > > I need to run muliple lm functions. My independent variables are called > dataset$x1, x2, x3, x4 etc. > > How can I use a loop counter variable to replace the numbers? > > > > fit1=lm(dataset$y~dataset$x1) > fi