Re: [R] climatological standard deviation- (question re-posted)

2008-09-24 Thread Yogesh Tiwari
Dear R Users, Sorry for not explaining the problem clearly. Here we go... I am using R on windows OS Here is an example data and script and then the problem what I want to solve. # (data period 1993-2002) #example data yr mo co2 1993 2 359.543 1993 2 358.359 1993 2 359.315 1993 2 359.293 1

[R] R function which finds confidence interval for binomial variance

2008-09-24 Thread Robert A. LaBudde
I need to construct confidence intervals for the binomial variance. This is the usual estimate v = x*(n-x)/n or its unbiased counterpart v' = x*(n-x)/(n-1) where x = binomial number of successes observed in n Bernoulli trials from proportion p. The usual X^2 method for vari

[R] Lattice: how to reduce/shrink plot area

2008-09-24 Thread K. Elo
Hi, is there a command or parameter for reducing the plotting area with lattice? What I am looking for is an option similar to 'mai' or 'mar' from the graphs package. Background: I have plotted several charts with horizontal stacked bars and now I would like to add info about percentages of each

[R] levelplot/heatmap question

2008-09-24 Thread cerman
Hello! I have data containing a large number of probabilities (about 60) of nonzero coefficients to predict 10 different independent variables (in 10 different BMA models). i've arranged these probabilities in a matrix like so: (IV1)(IV2)(IV3) ... p(b0)p(b0)p(b0) p(b1)p

Re: [R] ubuntu installation: can't find ldpaths

2008-09-24 Thread Dirk Eddelbuettel
On 24 September 2008 at 15:35, Paul Murtaugh wrote: | I'm trying to install R under Ubuntu 7.10 (gutsy; Linux | 2.6.22-15-generic x86_64). Following the instructions at | http://cran.r-project.org/bin/linux/ubuntu/README, I installed r-base, | r-base-core, and r-base-dev without any problems. W

Re: [R] design question on piping multiple data sets from 1 file into R

2008-09-24 Thread Moshe Olshansky
I think that you can use read.csv with nrows and skip arguments (see ?read.table). --- On Mon, 22/9/08, DS <[EMAIL PROTECTED]> wrote: > From: DS <[EMAIL PROTECTED]> > Subject: [R] design question on piping multiple data sets from 1 file into R > To: r-help@r-project.org > Received: Monday, 22 S

Re: [R] Splitting row names up and then adding up the columns associated with criteria from the parts of the site coding (help)

2008-09-24 Thread stephen sefick
that worked wonderfully. now that I have this part how can I sum the columns where the rows match my criteria? This is what I want to do in words sum the columns where the dates are equal and site equal up and also sum the columns where the dates are equal and site equal dn thanks Stephen On We

[R] Is there a way to add external variables to axis labels?

2008-09-24 Thread Arthur Roberts
Hi, all, Thanks for all your help in the previous emails. Question 1: Is there a way to use external variables in the axis labels? Question 2: Is there a way to make this variable subscript? Much appreciated, Art Roberts University of Washington __

Re: [R] ggplot: adding layer using different data, groups and also controlling appearance

2008-09-24 Thread hadley wickham
On Wed, Sep 24, 2008 at 7:57 PM, <[EMAIL PROTECTED]> wrote: > > > I have a more complicated function I am trying to write, but I run in to a > problem when I want to > add something to the plot from more than one data set while simultaneously > controlling the > appearance of the additional laye

Re: [R] Splitting row names up and then adding up the columns associated with criteria from the parts of the site coding (help)

2008-09-24 Thread Henrique Dallazuanna
Try this: library(gsubfn) do.call(rbind, strapply(d, "[a-z]{2}|[0-9]{4}")) On Wed, Sep 24, 2008 at 9:47 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > d <- c("upwd1201", "upwd0502", "upwd0702", "upwd1002", "upwd1102", > "upwd0203", "upwd0503", "upwd0803", "upwd0104", "upwd0704", "upwd0804", > "

[R] ggplot: adding layer using different data, groups and also controlling appearance

2008-09-24 Thread rmailbox
I have a more complicated function I am trying to write, but I run in to a problem when I want to add something to the plot from more than one data set while simultaneously controlling the appearance of the additional layer. # Toy data: foo <- data.frame ( x = 1:4, y = 4:1 , membership = c(

[R] Splitting row names up and then adding up the columns associated with criteria from the parts of the site coding (help)

2008-09-24 Thread stephen sefick
d <- c("upwd1201", "upwd0502", "upwd0702", "upwd1002", "upwd1102", "upwd0203", "upwd0503", "upwd0803", "upwd0104", "upwd0704", "upwd0804", "upwd1204", "upwd0805", "upwd1005", "upwd0106", "dnwd1201", "dnwd0502", "dnwd0702", "dnwd1002", "dnwd1102", "dnwd1202", "dnwd0103", "dnwd0203", "dnwd0303", "dnw

Re: [R] "F-value" and "P-value" for nonlinear regression ...

2008-09-24 Thread Douglas Bates
On Wed, Sep 24, 2008 at 2:54 PM, getulio coutinho figueiredo <[EMAIL PROTECTED]> wrote: > Hello, everyone! > I would like to know how to calculate the F-value and P-value for a > non-linear regression: y ~ a * X^b * W^c ? > Note: a, b and c are coefficients of adjustment of the equation and X and

[R] ubuntu installation: can't find ldpaths

2008-09-24 Thread Paul Murtaugh
I'm trying to install R under Ubuntu 7.10 (gutsy; Linux 2.6.22-15-generic x86_64). Following the instructions at http://cran.r-project.org/bin/linux/ubuntu/README, I installed r-base, r-base-core, and r-base-dev without any problems. When I open R, however, I get the message "Can't open /usr/li

[R] Matrix _0.999375-14 "Note" under CRAN Check, Hmisc_3.4-3 has Warning, Dpackage_1.0-5 has an Error

2008-09-24 Thread NManganaro
As context, I am a newbie, but preparing for a moderately deep dive into new areas af analysis while becoming familiar with R, at the same time. I have looked at the dependencies, amd imports for the Baysean and Econometrics View related analytics in R and have found that the Matrix package refere

Re: [R] Bug in "is" ?

2008-09-24 Thread Douglas Bates
On Wed, Sep 24, 2008 at 4:30 PM, Wacek Kusnierczyk <[EMAIL PROTECTED]> wrote: > Douglas Bates wrote: >> On Wed, Sep 24, 2008 at 11:08 AM, <[EMAIL PROTECTED]> wrote: >> >>> Thank you for all of you. Intuitively, 7 is an integer for people who live >>> in this planet. It is just very difficult for m

Re: [R] ANOVA with two random factors

2008-09-24 Thread gbrenes
> Hi. > > I have been learning R in order to use it for a class in design of > experiments. > > I have been using the command lme() to reproduce results from Montgomery's > book "Design and Analysis of experiments". > > I have a quantitative response variable called capacity, and two random > treat

Re: [R] string to numeric question

2008-09-24 Thread Henrik Bengtsson
See ?sprintf, e.g. x2Str <- sprintf("%02d", as.integer(x)) where 'x2' is numeric. Use x <- as.numeric(xStr) to convert string 'xStr' to numeric and x <- x + 1 to change the value. /HB On Wed, Sep 24, 2008 at 2:51 PM, <[EMAIL PROTECTED]> wrote: > this seems l ike it shouldn't be that hard but i

Re: [R] Bug in "is" ?

2008-09-24 Thread Carl Witthoft
quote: No doubt, 7.0 is integer in math. But if people can write 7 why people need to write 7.0 (I do not see any reason to do this). endquote First off, in physics, engineering, chem, etc. there is a well-known rule that 7 implies an error of +/- 0.5 while 7.0 implies an error of +/-0.05 .

[R] string to numeric question

2008-09-24 Thread markleeds
this seems l ike it shouldn't be that hard but i give up. if i have a string say, temp<-"01", I want to increase it by 1 so that it becomes "02". but the following code obviously won't work when the input string is say "10" because then it gives "011" when I just want "11". uuugh. does so

Re: [R] Bug in "is" ?

2008-09-24 Thread Rolf Turner
On 25/09/2008, at 7:45 AM, Douglas Bates wrote: My father taught me at an early age not to criticize the way that someone else does something until after you have shown that you can do it better. So Wayne Gretzky's coach should never have presumed to criticize him? :-) ch

Re: [R] Bug in "is" ?

2008-09-24 Thread Wacek Kusnierczyk
Douglas Bates wrote: > On Wed, Sep 24, 2008 at 11:08 AM, <[EMAIL PROTECTED]> wrote: > >> Thank you for all of you. Intuitively, 7 is an integer for people who live >> in this planet. It is just very difficult for me to believe that R does not >> think 7 is an integer but 7L is. >> >>> is.i

Re: [R] How can I comment out whole chunks of code?

2008-09-24 Thread baptiste auguie
just a thought: you might want to have a look at the brew package (R- forge). Instead of source()ing the document in the R console, you'd use brew(). By default, any text is considered a comment, only lines contained between <% %> will be run as R code. baptiste On 24 Sep 2008, at 21:03, M

Re: [R] How can I comment out whole chunks of code?

2008-09-24 Thread rkevinburton
I know you don't want to adopt a new text editor but Tinn-R can 'comment' a block of code (inserting # in front of the selected lines. Kevin Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 24/09/2008 4:03 PM, Mark Na wrote: > > Hello, > > > > I know this has been discussed, but I haven't fo

Re: [R] Bug in "is" ?

2008-09-24 Thread Rolf Turner
On 25/09/2008, at 12:42 AM, Martin Maechler wrote: [And, yes, if you think further and are wondering: If we'd design things from scratch, we would only have S4 classes and "double" would be a proper class and "numeric" would be the class union of {"integer", "double"} ]

Re: [R] Error message when calculating BIC

2008-09-24 Thread Donald Catanzaro, PhD
Hi All, Could someone help me decode what this error means ? > BIC(nb.80) Error in log(attr(object, "nobs")) : Non-numeric argument to mathematical function > BTW, nb.80 is a negative binomial glm model created using the MASS library with the call at the bottom of the message In the hopes of

Re: [R] How can I comment out whole chunks of code?

2008-09-24 Thread Gabor Grothendieck
Also if there are no single quotes in your line you can surround them with single quotes. Ditto for double quotes. junk <- " some R code possibly with syntax errors " If the code is in a function you can omit the junk<- part. On Wed, Sep 24, 2008 at 4:10 PM, Duncan Murdoch <[EMAIL PROTECTED]> wr

Re: [R] How can I comment out whole chunks of code?

2008-09-24 Thread Duncan Murdoch
On 24/09/2008 4:03 PM, Mark Na wrote: Hello, I know this has been discussed, but I haven't found an answer in the archives. Basically, I'd like to be able to comment out chunks of code (which may or may not be syntactically correct) without having to put the # symbol in front of each line (an

[R] xYplot - plotting all factors

2008-09-24 Thread John Poulsen
Hello, Sorry, I have used xYplot before and feel like this should be a very easy problem to solve. But I keep hitting a snag. I want the below code to plot three panels with different point estimates and their standard errors for each of five days. I keep getting a warning message (see bel

[R] How can I comment out whole chunks of code?

2008-09-24 Thread Mark Na
Hello, I know this has been discussed, but I haven't found an answer in the archives. Basically, I'd like to be able to comment out chunks of code (which may or may not be syntactically correct) without having to put the # symbol in front of each line (and, if possible, without having to adop

[R] problem with catching error message in open function

2008-09-24 Thread Baoqiang Cao
Hi R-helpers, I'm extracting data from an public server, since there is a restriction such that I have to submit my entries one by one (I have 10^5 entries). I partially succeeded with using tf <- open(url, "r") if(isOpen(tf, "r")) {readLines(tf)} close(tf) Some entries successfully were ret

Re: [R] Add "title" in sink output and possibility of plot-like output for text

2008-09-24 Thread Jorge Ivan Velez
Dear Michael, For your first question, something like this should work: sink("summ_model1and2.txt") cat('Summary model1','\n','\n') summary(model1) cat('\n','\n') cat('Summary model2','\n','\n') summary(model2) sink() For the second one, ?savePlot could work. HTH, Jorge On Wed, Sep

[R] "F-value" and "P-value" for nonlinear regression ...

2008-09-24 Thread getulio coutinho figueiredo
Hello, everyone! I would like to know how to calculate the F-value and P-value for a non-linear regression: y ~ a * X^b * W^c ? Note: a, b and c are coefficients of adjustment of the equation and X and W are variables previously measured ... Someone would have any suggestions? Thanks ...

Re: [R] Add "title" in sink output and possibility of plot-like output for text

2008-09-24 Thread Greg Snow
You could use the cat function to output some text that would then be included in the sinked output file. Or look at the txtStart and related functions in the TeachingDemos package for an alternative to sink that can include the code interspersed with the output and add additional text using tx

Re: [R] Is there a single command that can revert all the plotting parameters to default?

2008-09-24 Thread Greg Snow
dev.off() (but stephan's advice is probably the better approach for most cases). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Beha

Re: [R] Bug in "is" ?

2008-09-24 Thread Douglas Bates
On Wed, Sep 24, 2008 at 11:08 AM, <[EMAIL PROTECTED]> wrote: > Thank you for all of you. Intuitively, 7 is an integer for people who live > in this planet. It is just very difficult for me to believe that R does not > think 7 is an integer but 7L is. >> >> is.integer(7) # R 2.7.2 > > [1] FALSE >

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread stephen sefick
thanks man my head hurts- that is pretty simple. I was trying to will it done, which seems not to work. On Wed, Sep 24, 2008 at 3:38 PM, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 12:30 PM, stephen sefick <[EMAIL PROTECTED]> wrote: >> Deepayan I believe that I am dense-

Re: [R] possible interesting R projects for undergrads

2008-09-24 Thread Greg Snow
Here are some of the ideas I have used in the past teaching a class like this: Give them a paragraph of text describing data values and have them create a data frame from the data (the prose is so that there is not an obvious table structure to start with). Something like: Patient number 1 (ma

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread Deepayan Sarkar
On Wed, Sep 24, 2008 at 12:30 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > Deepayan I believe that I am dense- I am still having a problem > getting it working. I can not figure out how to use packet.number. Something like (untested) panel=function(...){ panel.xyplot(...)

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread stephen sefick
Deepayan I believe that I am dense- I am still having a problem getting it working. I can not figure out how to use packet.number. On Wed, Sep 24, 2008 at 2:56 PM, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 10:15 AM, stephen sefick <[EMAIL PROTECTED]> wrote: >> I would l

Re: [R] Generalising to n-dimensions

2008-09-24 Thread Laura Bonnett
Can I ask what a and v are? Thanks, Laura On Sat, Aug 23, 2008 at 11:41 AM, Robin Hankin <[EMAIL PROTECTED]> wrote: > Laura Bonnett wrote: > >> crosstable[,,expand[d,1],expand[d,2],expand[d,3],...expand[d,n]] >> crosstable is just a crosstabulation of an n+2-dimensional dataset and I >> am try

Re: [R] Calling object outside function

2008-09-24 Thread Adaikalavan Ramasamy
I don't understand why you need to use a function at all, especially when all your function arguments are overwritten inside the loop. Here is a simplified example of what you are doing: f <- function(x){ x <- 5 print(x) } Therefore f(1), f(2), ..., f(1000) etc all gives you the same answer.

Re: [R] Bug in "is" ?

2008-09-24 Thread Greg Snow
Mathematicians are concerned with properties of numbers, computer scientists are concerned with how numbers are stored (and statisticians when doing statistics are more concerned with data than numbers). R is an implementation of the S programming language (along with many tools written in that

Re: [R] Calling object outside function

2008-09-24 Thread jim holtman
You have to assign the value of the function to an object. You probably want: TAZDetermine <- Testdata() # I am not sure what your arguments to On Wed, Sep 24, 2008 at 1:16 PM, PDXRugger <[EMAIL PROTECTED]> wrote: > > What i thought was a simple process isnt working for me. After i create

Re: [R] keep the row indexes/names when do aggregate

2008-09-24 Thread Adaikalavan Ramasamy
Not the most elegant solution but here goes. df <- data.frame(g=c("g1","g2","g1","g1","g2"),v=c(1,7,3,2,8)) rownames.which.max <- function(m, col){ w <- which.max( m[ , col] ) return( rownames(m)[w] ) } df.split <-

Re: [R] Is there a single command that can revert all the plotting parameters to default?

2008-09-24 Thread Adaikalavan Ramasamy
What do you mean? If you kill the existing graph, perhaps using dev.off(), the next plot generated should use default values. Is this what you want? Some plotting functions use this at the start before modifying oldpar <- par(no.readonly=T) on.exit(par(oldpar)) Regards, Adai Regards, Adai

Re: [R] Is there a single command that can revert all the plotting parameters to default?

2008-09-24 Thread stephen sefick
when you set par(...) use op <- par(...) par(...) and then when you want to go back use par(op) On Wed, Sep 24, 2008 at 2:38 PM, Arthur Roberts <[EMAIL PROTECTED]> wrote: > Hi, all, > > This might be a stupid question. Is there a single command in R that can > revert parameters to default? It

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread Deepayan Sarkar
On Wed, Sep 24, 2008 at 10:15 AM, stephen sefick <[EMAIL PROTECTED]> wrote: > I would like to use the data below where the plots are close to what I > want. Instead of color I would like to use different symbols, and > have the symbols in the legend match the graphs. I am also going to See ?simp

Re: [R] looping through variables

2008-09-24 Thread Adaikalavan Ramasamy
Perhaps what you want is get(). apple <- rnorm(5) orange <- runif(5) fruits <- c("apple", "orange") fruit.data <- NULL for( fruit in fruits ){ v <- get(fruit) fruit.data <- cbind(fruit.data, v) } colnames(fruit.data) <- fruits fruit.data Here the resulting

Re: [R] rgl: ellipse3d with axes

2008-09-24 Thread John Fox
Dear Michael, Maybe this is irrelevant, since you appear to have a satisfactory solution now, but here's an approach (from a figure that I drew in a recent book) that computes the axes directly. This example is in 2D but I think that it wouldn't be hard to generalize it: --- snip li

[R] Is there a single command that can revert all the plotting parameters to default?

2008-09-24 Thread Arthur Roberts
Hi, all, This might be a stupid question. Is there a single command in R that can revert parameters to default? It is much appreciated. Best wishes, Art Roberts University of Washington __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

[R] Calling object outside function

2008-09-24 Thread PDXRugger
What i thought was a simple process isnt working for me. After i create an multiple objects in a function (see below), how to i use those objects later in the program. I tried calling the function again and then the object i wanted and it worked the first time but now it doesnt( i think i define

[R] R on Mandriva

2008-09-24 Thread Abdelwaheb Hannachi
Hi there, I am looking to install R on Mandriva-linux. But on the UK mirror site I found only Debian, Redhat, Suse, and Ubuntu, but not Mandriva. Any help would be greatly appreciated Thanks -- Abdel Hannachi Reading, UK _

Re: [R] Why horizontal bars instead of a line

2008-09-24 Thread Schreiber, Stefan
Hey Greg! Thank you very much for your detailed response!! I really appreciate that! Yeah, you're right! The axis labels are the way to go ... I was so focused on getting rid of the bars, that I didn't even think about that. Sorry for bothering the list about that! Stefan -Original Messa

Re: [R] t tests/ANOVA

2008-09-24 Thread Adaikalavan Ramasamy
First check that your data satisfies the normality assumption. If yes, then start with the ANOVA test summary( fit <- aov( genomes ~ clonefed ) ) and *if* you find a significant F-value, you can see which difference is significant. i.e. post-hoc analysis. TukeyHSD( fit, "clonefed" ) Y

Re: [R] Installing R 2.7.2 on Windows with /LOADINF flag doesn't do anything

2008-09-24 Thread Duncan Murdoch
On 23/09/2008 7:11 AM, Duncan Murdoch wrote: On 23/09/2008 5:27 AM, michael watson (IAH-C) wrote: Hi I want to install R from a script, so am following http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-customize-t he-installation_003f. I first installed R with the /SAVEINF="r_ins

Re: [R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread stephen sefick
xyplot(GPP~(1/Iron)+(1/TSS)+TIN.TP, groups=RiverMile,data=f, scales=list(relation="free"), par.settings = list( superpose.symbol = list( pch = c(1:7), fill = c("red", "blue"), col = "black")), auto.key=TRUE, panel=function(...){

Re: [R] Why horizontal bars instead of a line

2008-09-24 Thread Greg Snow
Remember that computers are not as smart as you. Some smart people have written instructions for the computer on what to do in certain cases, but they can't anticipate everything, so when you tell the computer to do something that was different from what is anticipated, it either gives an error

Re: [R] Proper power computation for one-sided binomial tests.

2008-09-24 Thread Johannes Hüsing
Am 23.09.2008 um 23:57 schrieb Peter Dalgaard: For this kind of problem I'd go directly for the binomial distribution. If the actual probability is 0, this is essentially deterministic and you can look at > binom.test(0,99,p=.03, alt="less") This means that you don't sample from the p=.03

Re: [R] Modifying output to Google Docs

2008-09-24 Thread Ajay ohri
Wow. Dont you get to name it on me or something (like the RPackageGoogleAjayDoc ?) Just kidding This is fabulous and the reason this community is so innovative Now if only someone can create a package for me to use R from Amazon EC2 and be free of the damn RAM problem forever ...

Re: [R] Modifying output to Google Docs

2008-09-24 Thread Duncan Temple Lang
The command line app is fine, although there are some potential security issues or annoyances with a smooth work flow. But it would be more flexible and powerful to do it directly in R. And we don't need to know or program in C. The RCurl (https, getForm() and postForm()) and XML packages provi

Re: [R] Proper power computation for one-sided binomial tests.

2008-09-24 Thread Collin Lynch
Thank you Peter. That is incredibly helpfyul, and much much smaller! Best, Collin. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide

Re: [R] Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?

2008-09-24 Thread Greg Snow
And here is one way of using JohnsonFit to display how a distribution changes with changes in the moments: library(TeachingDemos) library(SuppDists) tmpfun <- function(m1=0,m2=1,m3=-0.2,m4=3.7, xmin=-3, xmax=3){ parms <- JohnsonFit( c(m1,m2,m3,m4), 'use') plot(function(x) dJohnso

[R] Add "title" in sink output and possibility of plot-like output for text

2008-09-24 Thread Michael Just
Hello, I have been using sink to create text file outputs. >sink("summ_model1and2.txt") > summary(model1) > summary(model2) > sink() Q1: Is there a way I could add a line of the text above the summary to act like a title? Also, I have been using the following to save plots from the lm function:

[R] possible interesting R projects for undergrads

2008-09-24 Thread Erin Hodgess
Dear R People: I finally (Yay!) got R installed in a classroom! Anyhow, I have a respectful request, please: could anyone recommend some nice undergrad projects in R, please? This is in a statistical computation class; first time being run. Thanks, Erin -- Erin Hodgess Associate Professor D

[R] lattice xyplot symbols instead of colors and legend matching plot symbols or colors

2008-09-24 Thread stephen sefick
I would like to use the data below where the plots are close to what I want. Instead of color I would like to use different symbols, and have the symbols in the legend match the graphs. I am also going to add a regression line to these I know about the type="r" (which is fine for these particular

Re: [R] Options for viewing / using results from lm

2008-09-24 Thread Greg Snow
I don't remember which version View was added in, but it was more recent than 2.4.1. I would suggest upgrading (2.4.1 is ancient in R terms). You can get something similar with: > invisible(edit(mydata)) But you will have to close the window to continue with R (View lets you look at the data

Re: [R] Bug in "is" ?

2008-09-24 Thread ctu
Hi Keith, No doubt, 7.0 is integer in math. But if people can write 7 why people need to write 7.0 (I do not see any reason to do this). My point is that R maybe can do something like S-plus. No point to argue. don't you think so? Thanks Chunhao Quoting Keith Jewell <[EMAIL PROTECTED]>:

[R] Fortunes Candidates from Keith Jewell?

2008-09-24 Thread Bert Gunter
IMHO Keith Jewell has a couple of "jewels" here (sorry Keith -- couldn't resist): nice possible fortunes package candidates: "IMHO in R there is nothing to be fixed (in this regard) except your understanding." " This is a computer language, not English; intuition isn't reliable, so we have hel

Re: [R] How to draw the graph of f(x,y) = x * y ?

2008-09-24 Thread Paul Smith
On Wed, Sep 24, 2008 at 4:14 PM, Farley, Robert <[EMAIL PROTECTED]> wrote: > You could always try > F(x,y) = f(x) + 0*y > > That is "zero out" the degenerate dimensions. Of course you'll be > plotting what is essentially a two dimensional object as if it were > three dimensional. The degeneracy

Re: [R] rgl: ellipse3d with axes

2008-09-24 Thread Duncan Murdoch
On 24/09/2008 12:32 PM, Michael Friendly wrote: Thanks Duncan (& others) Here is a function that does what I want in this case, and tries to do it to work generally with ellipse3d. (Note that I reverse the order of centre and scale 'cause I was bitten by trying ellipse3d.axes(cov, mu)) # dr

Re: [R] logistic regression model validation through bootstrapping

2008-09-24 Thread Frank E Harrell Jr
Van Dyke, Alison wrote: I'm new to R and to validation of logistic regression models via bootstrapping. I see that there are various approaches to bootstrapping, and I am wondering (1) which approach would be best for internal validation of predictive discrimination, (2) are there any good re

[R] logistic regression model validation through bootstrapping

2008-09-24 Thread Van Dyke, Alison
I'm new to R and to validation of logistic regression models via bootstrapping. I see that there are various approaches to bootstrapping, and I am wondering (1) which approach would be best for internal validation of predictive discrimination, (2) are there any good resources that could be reco

Re: [R] Bug in "is" ?

2008-09-24 Thread Keith Jewell
Have you tried is.integer(7.0) in S-Plus? (I have) Do you think 7.0 is integer? IMHO in R there is nothing to be fixed (in this regard) except your understanding. This is a computer language, not English; intuition isn't reliable, so we have help pages. is.integer(x) is not intended to indicate

Re: [R] rgl: ellipse3d with axes

2008-09-24 Thread Michael Friendly
Thanks Duncan (& others) Here is a function that does what I want in this case, and tries to do it to work generally with ellipse3d. (Note that I reverse the order of centre and scale 'cause I was bitten by trying ellipse3d.axes(cov, mu)) # draw axes in the data ellipse computed by ellipse3d

[R] weights option in lmer

2008-09-24 Thread maria jose juan jorda
Hi all, I am trying to run a linear mixed effect models in lmer() from the lme4 package using the weights option. I am using the R version 2.7.2 (2008-08-25) and lmer version in lme4_0.999375-26, which I think it is the latest version! I am getting and error message when I add the optio

Re: [R] Graph question

2008-09-24 Thread stephen sefick
look at histogram and densityplot in the lattice package On Wed, Sep 24, 2008 at 9:26 AM, Georgina Sarah Humphreys <[EMAIL PROTECTED]> wrote: > If I have a set of data comprising a list of numbers of eggs on mosquito guts > that range from 1 to 157. How can I get R to draw a barchart of the > d

Re: [R] climatological standard deviation- (question re-posted)

2008-09-24 Thread stephen sefick
package zoo rollapply if I had to guess at what you want to do, but heed the advice given above. On Wed, Sep 24, 2008 at 12:11 PM, Sarah Goslee <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2008 at 8:43 AM, Yogesh Tiwari > <[EMAIL PROTECTED]> wrote: >> Sorry for re-posting the question, I did not g

Re: [R] Why horizontal bars instead of a line

2008-09-24 Thread Sarah Goslee
Since x$GrSe isn't a number, what do you expect R to do? On Wed, Sep 24, 2008 at 11:28 AM, Schreiber, Stefan <[EMAIL PROTECTED]> wrote: > Hey list! > > > It looks simple, though it's not possible for me to plot the following > properly: > > (some made-up data) > > GrSeClone1 Clone2 Clone3 C

Re: [R] climatological standard deviation- (question re-posted)

2008-09-24 Thread Sarah Goslee
On Wed, Sep 24, 2008 at 8:43 AM, Yogesh Tiwari <[EMAIL PROTECTED]> wrote: > Sorry for re-posting the question, I did not get any reply. > Kindly reply please if any one can. Most likely that's because you didn't clearly explain the problem. Please read the posting guide (see link at bottom of eac

Re: [R] climatological standard deviation- (question re-posted)

2008-09-24 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Yogesh Tiwari > Sent: Wednesday, September 24, 2008 5:43 AM > To: [EMAIL PROTECTED] > Subject: [R] climatological standard deviation- (question re-posted) > > Sorry for re-posting the question, I did n

Re: [R] Bug in "is" ?

2008-09-24 Thread ctu
Thank you for all of you. Intuitively, 7 is an integer for people who live in this planet. It is just very difficult for me to believe that R does not think 7 is an integer but 7L is. is.integer(7) # R 2.7.2 [1] FALSE Thus, based on Martin's comments, I try it again on the S-PLUS 8.0 and i

Re: [R] How do I Convert "<1" to the number 1?

2008-09-24 Thread John Fox
Dear Tom, I don't know whether it qualifies as elegant or clever, but you should be able to use sub(), as in > as.numeric(sub("<", "", c("1", "< -2", "<1"))) [1] 1 -2 1 I hope this helps, John On Wed, 24 Sep 2008 08:08:21 -0700 (PDT) Tom La Bone <[EMAIL PROTECTED]> wrote: > > Is there an e

[R] t tests/ANOVA

2008-09-24 Thread Georgina Sarah Humphreys
I have a set of data that comprises genome numbers in single eggs from three different parasite clones - 3D7, HB3, and MIX. I can draw a boxplot of the genome numbers for each clonefed but how do I carry out a t test or ANOVA to compare if the means are signifcantly different? (Data is listed b

[R] Simulations / repetitions help!

2008-09-24 Thread Lauren_G
Dear all, My question concerns using repetitions and simulations (loops?) in R. I am very new R user, so any help that can be offered would be greatly appreciated! I am using fitdistr() to determine the distribution of empirical univariate datasets, and ks.test to assess the goodness of fit.

[R] climatological standard deviation- (question re-posted)

2008-09-24 Thread Yogesh Tiwari
Sorry for re-posting the question, I did not get any reply. Kindly reply please if any one can. ### Hello R users, I have a montly time series over a several year period. It's easy to compute a monthly climatology (12 values), Now, I would like to calculate the corresponding standard deviation, i

[R] Graph question

2008-09-24 Thread Georgina Sarah Humphreys
If I have a set of data comprising a list of numbers of eggs on mosquito guts that range from 1 to 157. How can I get R to draw a barchart of the distribution of the data (i.e. x axis= number of eggs on a gut, y axis=number of mosquitoes found with that number of eggs)? Data is listed below.

[R] (nlme) Repeated measures with continuous covariate in lme

2008-09-24 Thread Robert Buitenwerf
Dear readers, I have a basic question about how to use lme for my design. I haven't been able to find an example in r-help that made it clear to me how to tackle this problem and unfortunately I also cannot get hold of Pinheiro & Bates 2000. I hope someone can help. Data for the response va

Re: [R] keep the row indexes/names when do aggregate

2008-09-24 Thread Gabor Grothendieck
Rather than aggregate, use order and duplicated as in this post: https://stat.ethz.ch/pipermail/r-help/2008-September/173139.html On Wed, Sep 24, 2008 at 11:21 AM, zhihuali <[EMAIL PROTECTED]> wrote: > > Hi, R-users, > > If I have a data frame like this: >>x<-data.frame(g=c("g1","g2","g1","g1","g

[R] Why horizontal bars instead of a line

2008-09-24 Thread Schreiber, Stefan
Hey list! It looks simple, though it's not possible for me to plot the following properly: (some made-up data) GrSeClone1 Clone2 Clone3 Clone4 Clone... G1999 2 3 6 5 G2000 2 5 7 4 G2001 5 3 7 3 G2002 4 5 8 3

Re: [R] Weights for polr

2008-09-24 Thread Gregory Wawro
Thanks for directing my attention to the survey package and svyolr(). Best, Greg . Gregory Wawro [EMAIL PROTECTED] Associate Professor phone: 212-854-8540 Dept. of Political Science fax:212-222-0598 741 Inte

Re: [R] rgl: ellipse3d with axes

2008-09-24 Thread Duncan Murdoch
On 24/09/2008 11:11 AM, Duncan Murdoch wrote: On 24/09/2008 10:12 AM, Michael Friendly wrote: Duncan Murdoch wrote: The normals component contains the surface normals. It is used to help in rendering the surface, but isn't much use for your purposes. Unfortunately, I'm not familiar enough with

[R] keep the row indexes/names when do aggregate

2008-09-24 Thread zhihuali
Hi, R-users, If I have a data frame like this: >x<-data.frame(g=c("g1","g2","g1","g1","g2"),v=c(1,7,3,2,8)) g v 1 g1 1 2 g2 7 3 g1 3 4 g1 2 5 g2 8 It contains two groups, g1 and g2. Now for each group I want the max v: > aggregate(x$v,list(g=x$g),max) g x 1 g1 3 2 g2 8 Beautiful. But wh

Re: [R] How to convert backslash to slash?

2008-09-24 Thread Duncan Murdoch
On 24/09/2008 10:53 AM, hadley wickham wrote: I agree that that some sort of facility would be convenient. Creating latex output is another situation where not having to escape backslashes would be convenient. And regular expressions, of course. There were proposals to do this last year (I t

[R] looping through variables

2008-09-24 Thread K. Fleischer
Hello everyone, I have the following problem: My analysis includes many predictor variables (>50) in the form of raster maps (asc), but I am trying to avoid having to type all their names over and over again in the analysis (e.g. for vectorisation, for deletion of NA's, etc.) So ideally I wou

Re: [R] How to draw the graph of f(x,y) = x * y ?

2008-09-24 Thread Farley, Robert
You could always try F(x,y) = f(x) + 0*y That is "zero out" the degenerate dimensions. Of course you'll be plotting what is essentially a two dimensional object as if it were three dimensional. The degeneracy in y means a 2-D curve will be "extruded" along the Y dimension. Robert Farley Met

Re: [R] rgl: ellipse3d with axes

2008-09-24 Thread Duncan Murdoch
On 24/09/2008 10:12 AM, Michael Friendly wrote: Duncan Murdoch wrote: The normals component contains the surface normals. It is used to help in rendering the surface, but isn't much use for your purposes. Unfortunately, I'm not familiar enough with the internals of princomp to tell you how to

[R] How do I Convert "<1" to the number 1?

2008-09-24 Thread Tom La Bone
Is there an elegant way in R to change a number reported as a less-than number in text format, "<1" for example, to the numeric equivalent 1? I have been trying to use as.numeric, but have not come up with anything clever yet. Tom -- View this message in context: http://www.nabble.com/How-do-

Re: [R] Counting character occurrences in data frame

2008-09-24 Thread Hutchinson,David [PYR]
Thanks Charles, ftable() works perfectly. -Original Message- From: Charles C. Berry [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:06 PM To: Hutchinson,David [PYR] Cc: r-help@r-project.org Subject: Re: [R] Counting character occurrences in data frame See ?ftabl

Re: [R] How to convert backslash to slash?

2008-09-24 Thread hadley wickham
> I agree that that some sort of facility would be convenient. Creating > latex output is > another situation where not having to escape backslashes would be convenient. And regular expressions, of course. Hadley -- http://had.co.nz/ __ R-help@r-pro

  1   2   >