[R] Sweave problem: lines repeated

2010-12-13 Thread Peter Dunn
Hi all I'm having a problem when using Sweave. Here is a minimal example. My input file (eg, test.Snw) looks like this: <>= data(cars) m1 <- lm( dist~speed, data=cars ); coef( m1 ) @ <>= <> @ <>= data(cars) m1 <- lm( dist~speed, data=cars ) @ <>= <> @ After running Sweave over this

Re: [R] read ESRI file geodatabase feature classes

2010-12-13 Thread Michael Sumner
A recent announcement as a follow up to this: http://blogs.esri.com/Dev/blogs/geodatabase/archive/2010/12/13/File-Geodatabase-API-details.aspx Still requires ESRI software, but will allow some other projects to read the format if ArcRequired is available. Cheers, Mike. On Tue, Dec 7, 2010 at 7:

Re: [R] tcltk error compiling R 2.13.0 under Windows 7 x64

2010-12-13 Thread Joshua Wiley
Hi Peter, On Mon, Dec 13, 2010 at 5:26 PM, Peter Langfelder wrote: > Just in case no one knowledgeable answers, here's my shot in the dark I switch between Windows and Linux so I'm always in the dark ;) > (I'm mostly a linux user)... the compiler is looking for .h files in > the directories lis

Re: [R] peak detection

2010-12-13 Thread Michael Bedward
Hi Joe, Just for info, I've done this in the past by applying lowess followed by diff to a vector, then identifying points with change of sign in the diffs. Michael On 14 December 2010 14:22, Joe Stuart wrote: > Never mind. I did find this package, which seems to do the trick. Thanks > > http:/

Re: [R] peak detection

2010-12-13 Thread Joe Stuart
Never mind. I did find this package, which seems to do the trick. Thanks http://rgm2.lab.nig.ac.jp/RGM2/R_man-2.9.0/library/msProcess/man/msExtrema.html On Mon, Dec 13, 2010 at 9:05 PM, Joe Stuart wrote: > Hi, > I was wondering if anyone knows of a package that contains the ability > for peak/va

Re: [R] Schedule R to run automatically

2010-12-13 Thread Steven McKinney
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of joeponzio > Sent: December-13-10 4:13 PM > To: r-help@r-project.org > Subject: [R] Schedule R to run automatically > > > Current I have raw data from several projects that is w

[R] peak detection

2010-12-13 Thread Joe Stuart
Hi, I was wondering if anyone knows of a package that contains the ability for peak/valley detection. Here is an example of what I'm looking for, only problem is that it's written in Matlab. http://www.billauer.co.il/peakdet.html Thanks for any help in advance. -Joe

Re: [R] multivariate multi regression

2010-12-13 Thread David Winsemius
On Dec 13, 2010, at 9:21 PM, Bastiaan Bergman wrote: That doesn't work, one would get two different answers depending on the order of execution. The physics is: Overlay error on a Silicon wafer. One wafer has many flash fields, each flash field has multiple locations where the overlay er

Re: [R] Testing an interaction with a random effect in lmer

2010-12-13 Thread Ben Bolker
Reed, Nicola exeter.ac.uk> writes: > I was hoping to get some advice regarding the testing of interactions, > when one factor is modelled as a > random effect... > I have a model with binomial error structure where the response > variable is the proportion of time spent at > the main sett (anima

Re: [R] Time out for a R Function

2010-12-13 Thread Henrik Bengtsson
FYI, I've added evalWithTimeout() to R.utils v1.6.0 (now on CRAN). It utilizes the built-in setTimeLimit() feature of R. You can either have it throw an error, which you then have to catch, or you can have it just give a warning that your evaluation timed out and then silently continue. From ex

Re: [R] multivariate multi regression

2010-12-13 Thread Bastiaan Bergman
That doesn't work, one would get two different answers depending on the order of execution. The physics is: Overlay error on a Silicon wafer. One wafer has many flash fields, each flash field has multiple locations where the overlay error is measured (as: dX,dY offset). If one contemplates that th

Re: [R] multivariate multi regression

2010-12-13 Thread Joe P King
I am not even sure what model you are trying to run, you are talking about regression slopes for x1 being coef1, and coef2 being the slope for x2, where are you getting coef3 from, is it in your data? Joe King 206-913-2912 j...@joepking.com "Never throughout history has a man who lived a life of e

[R] Second summary [( S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?]

2010-12-13 Thread Emmanuel Charpentier
Dear list, The "starting" solution proposed by Duncan Murdoch is an *excellent* start for Sweave'ing. One can trivially redefine Sweave to start using it quasi-transparently (to use it transparently would require patching Sweave, which would be worth some failsafes and possibly options tinkeri

[R] Schedule R to run automatically

2010-12-13 Thread joeponzio
Current I have raw data from several projects that is written to a drive on a daily basis. I would like to run a certain R syntax against these data sets (varying somewhat from data set to data set) every day at, say, 7am (with no human interaction). Is this possible to set up in windows or unix

Re: [R] Complicated nls formula giving singular gradient message

2010-12-13 Thread dave fournier
I always enjoy these direct comparisons between different software packages. I coded this up in AD Model Builder which is freely available at http://admb-project.org ADMB calculates exact derivatives via automatic differentiation so it tends to be more stable for these difficult problems. The p

[R] writing sample values in to a file

2010-12-13 Thread chandu
Dear all, I am relatively new to R. I would like to know how can we write the realizations (for example generated through rnorm or runif) in to a data file. It would be very inefficient to first generate values and then write them in to file using "write" function. Instead, is there a way to ge

Re: [R] multivariate multi regression

2010-12-13 Thread David Winsemius
On Dec 13, 2010, at 8:46 PM, Bastiaan Bergman wrote: Hello, I want to model my data with the following model: Y1=X1*coef1+X2*coef2 Y2=X1*coef2+X2*coef3 Note: coef2 appears in both lines Xi, Yi is input versus output data respectively How can I do this in R? I got this far: lm(Y1~X1+X2

[R] multivariate multi regression

2010-12-13 Thread Bastiaan Bergman
Hello, I want to model my data with the following model: Y1=X1*coef1+X2*coef2 Y2=X1*coef2+X2*coef3 Note: coef2 appears in both lines Xi, Yi is input versus output data respectively How can I do this in R? I got this far: lm(Y1~X1+X2,mydata) now how do I add the second line of t

Re: [R] How to ignore data

2010-12-13 Thread David Winsemius
On Dec 13, 2010, at 3:07 PM, Barry Rowlingson wrote: On Mon, Dec 13, 2010 at 7:36 PM, Steve Sidney wrote: Oh dear oh dear!!! another arrogant statistician/scientist One asks for help and instead one gets an ear full!!! we're statisticians. we love data. we hate seeing it go to waste. ev

Re: [R] tcltk error compiling R 2.13.0 under Windows 7 x64

2010-12-13 Thread Peter Langfelder
On Mon, Dec 13, 2010 at 4:33 PM, Joshua Wiley wrote: > Hi All, > > I am trying to compile R 2.13.0 r53834 on 64-bit Windows 7 (home > premium) using Rtools212.exe from Duncan Murdoch's site.  I (think) I > followed the installation guide for Windows.  When installing Rtools, > made sure I was inst

Re: [R] Forcing standard notation in Sweave tables

2010-12-13 Thread Bryan Hanson
Take a look at package xtable. Bryan On 12/13/10 7:31 PM, "Chris Fonnesbeck" wrote: > I'm hoping someone with some experience generating tables in Sweave will be > able to solve this problem for me. I'm experiencing some inconsistency with > the way floating point numbers are displayed -- for

[R] Merge() error

2010-12-13 Thread Jeremy Miles
Hi All, I'm getting some weird problems with merge(), which give me the Error in match.names(clabs, names(xi)) : names do not match previous names Error. I've found other people discussing this error, but they don't seem to match my situation, and the strange thing is that changing the order

[R] tcltk error compiling R 2.13.0 under Windows 7 x64

2010-12-13 Thread Joshua Wiley
Hi All, I am trying to compile R 2.13.0 r53834 on 64-bit Windows 7 (home premium) using Rtools212.exe from Duncan Murdoch's site. I (think) I followed the installation guide for Windows. When installing Rtools, made sure I was installing 64-bit tools (including tcltk), etc. I created a copy of

[R] Forcing standard notation in Sweave tables

2010-12-13 Thread Chris Fonnesbeck
I'm hoping someone with some experience generating tables in Sweave will be able to solve this problem for me. I'm experiencing some inconsistency with the way floating point numbers are displayed -- for some tables, they will be in standard notation, e.g. 11±26 while in others, it uses exp

Re: [R] binding data.frames with sequential names

2010-12-13 Thread Phil Spector
Tony - Try do.call(rbind,lapply(paste('X',1:i,sep=''),get)) (You've created the names, but you need to tell R to use the objects which have those names. That's what get() does.) You'd probably be better served by putting the data frames you create into a list as they are created, rathe

[R] binding data.frames with sequential names

2010-12-13 Thread Anthony Fristachi
Hello, I have data frames X1 to X19 I want a simple way to bind them as the next run(s) will generate many more sequential data frames. I tried the following with i = 19: > my.list <- as.list(paste("X",1:i,sep="")) > new.data <- do.call("rbind", my.list) > new.data [,1] [1,] "X1" [2,

Re: [R] Complicated nls formula giving singular gradient message

2010-12-13 Thread Phil Spector
Jared - Actually I didn't realize that nls would accept a formula until I tried my simple example in reaction to your post :-) I don't recall nls() ever reporting the cause of the singular gradient as being bad starting values -- I know I spend a lot of time in my lectures on non-linear regr

[R] Multivariate binary response analysis

2010-12-13 Thread Janszen, Derek B
Greetings ~ I need some assistance determining an appropriate approach to analyzing multivariate binary response data, and how to do it in R. The setting: Data from an assay, wherein 6-hours-post-fertilization zebrafish embryos (n=20, say) are exposed in a vial to a chemical (replicated 3 times

[R] Help with lme for split plot

2010-12-13 Thread CBEdge
Hello, I am having trouble doing a split plot analysis of variance with lme. The study design is ponds split in two, one side of each pond was a control and the other was one of three chemical treatments. Each pond side was sampled three times, response variable is the mean of twenty animals.

Re: [R] inconsistency with cor() - "x must be numeric"

2010-12-13 Thread peter dalgaard
On Dec 13, 2010, at 23:23 , Justin Fincher wrote: > I apologize for the lack of example. I was trying not to be too long > winded. Below is the first portion of my function that is causing the > error. (I'm including both calls to cor(), though it quits after the first > throws an error). I do

Re: [R] inconsistency with cor() - "x must be numeric"

2010-12-13 Thread Joshua Wiley
Hi, I can certainly understand not wanting to be long winded, and no damage done. Here's a link to the R news file: http://cran.stat.ucla.edu/src/base/NEWS and if you search in your browser for "cor() and cov()" you should find what happened. At any rate, I could not fully check your code beca

Re: [R] inconsistency with cor() - "x must be numeric"

2010-12-13 Thread Justin Fincher
I apologize for the lack of example. I was trying not to be too long winded. Below is the first portion of my function that is causing the error. (I'm including both calls to cor(), though it quits after the first throws an error). I do not believe he has redefined cor() as he is a novice user a

Re: [R] Complicated nls formula giving singular gradient message

2010-12-13 Thread Jared Blashka
Phil, This is great! I had no idea nls would accept functions in the formula position. My apologies for not including data to reproduce my issue. dat<-data.frame(X=c(-13.0,-11.0,-10.0,-9.5,-9.0,-8.5,-8.0,-7.5,-7.0,-6.5,-6.0,-5.0, -13.0,-11.0,-10.0,-9.5,-9.0,-8.5,-8.0,-7.5,-7.0,-6.5,-6.0,-5.0), Y=

Re: [R] Wrong contrast matrix for nested factors in lm(), rlm(), and lmRob()

2010-12-13 Thread peter dalgaard
On Dec 13, 2010, at 12:48 , Saul Sternberg wrote: > > This message also reports wrong estimates produced by lmRob.fit.compute() > for nested factors when using the correct contrast matrix. > > And in these respects, I have found that S-Plus behaves the same way as R. > > Using the three availa

Re: [R] inconsistency with cor() - "x must be numeric"

2010-12-13 Thread Joshua Wiley
Hi Fincher, cor() only works on numeric arguments now (as of R 2.11 or 2.10 if memory serves). So, I would update your function to ensure that you are only passing numeric data to cor() and the error should go away (it will probably be easier on you if you can update your version of R to the late

Re: [R] Summary (Re: (S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?)

2010-12-13 Thread Liviu Andronic
On Mon, Dec 13, 2010 at 12:30 AM, Emmanuel Charpentier wrote: > Therefore, I let this problem to sleep. However, I Cc this answer (with > the original question below) to Max Kuhn and Friedrich Leisch, in the > (faint) hope that this feature, which does not seem to have been missed > by anybody in

Re: [R] inconsistency with cor() - "x must be numeric"

2010-12-13 Thread Erik Iverson
Please provide a reproducible example! E.g., use ?dput to dump a minimal data.frame that exhibits this issue on the newest version of R. Justin Fincher wrote: Howdy, I have written a small function to generate a simple plot and my colleague is having an error when attempting to run it. Esse

[R] inconsistency with cor() - "x must be numeric"

2010-12-13 Thread Justin Fincher
Howdy, I have written a small function to generate a simple plot and my colleague is having an error when attempting to run it. Essentially I loop through categories in a data frame and take the average value for each category The categories are in $V1, subset first then mean taken and concaten

Re: [R] How to ignore data

2010-12-13 Thread Steve Sidney
Firstly apologies that I didn't see Ben's original response, thanks. (Found that I had my subscription to the list disabled, so only received mails to my address directly.) Also I shouldn't have had the 'knee-jerk' re-action that I did and should have followed Bert's advice by not replying, bu

[R] OFFTOPIC: BAD SCIENCE by Ben Goldacre

2010-12-13 Thread Bert Gunter
Folks: This is off topic, but I believe many R-Help participants would be interested in this. My apologies to my British colleagues, who probably already know about this, and to others for whom this is a waste of their time. Dr. Ben Goldacre, a British Physician and science columnist, has written

[R] Date variable error

2010-12-13 Thread Kurt_Helf
Greetings In attempting to create a date variable based on month (e.g., February, April, etc.) and year (e.g., 2006) data, wherein I converted Month to a factor with Jan=1...Dec=12, I used the following command: data$Date<-mdy.date(month=data$Month,day=15,year=data$Year) however, I get a mes

Re: [R] Integration with LaTex and LyX

2010-12-13 Thread Yihui Xie
I tried hard to write an automagic script to configure LyX so that you don't need to go to the instructions on CRAN (http://cran.r-project.org/contrib/extra/lyx/): http://yihui.name/en/2010/10/how-to-start-using-pgfsweave-in-lyx-in-one-minute/ This works for LyX 1.6.x and major OS'es with probabi

Re: [R] Does a formula object have a "left hand side"

2010-12-13 Thread Erik Iverson
Excellent, thank you all! William Dunlap wrote: attr(terms(formula), "response") is 1 if the formula has a left hand side and 0 otherwise. At a lower level, you can look at length(formula): 2 means there is no LHS, 3 means there is (any other value indicates that someone made a call object that

Re: [R] How to ignore data

2010-12-13 Thread Peter Ehlers
On 2010-12-13 11:36, Steve Sidney wrote: Oh dear oh dear!!! another arrogant statistician/scientist One asks for help and instead one gets an ear full!!! So much for the much vaunted helpful R community. But thanks anyway, I guess you were trying Steve Ouch!! I didn't offer advice e

Re: [R] Does a formula object have a "left hand side"

2010-12-13 Thread Phil Spector
Erik - Perhaps the "response" attribute of the terms() function? formula1 = formula(y ~ x + z) formula2 = formula(~x + z) attr(terms(formula1),'response') [1] 1 attr(terms(formula2),'response') [1] 0 Although there may be more direct ways. - Phi

Re: [R] Does a formula object have a "left hand side"

2010-12-13 Thread William Dunlap
attr(terms(formula), "response") is 1 if the formula has a left hand side and 0 otherwise. At a lower level, you can look at length(formula): 2 means there is no LHS, 3 means there is (any other value indicates that someone made a call object that the parser would not make). Bill Dunlap Spotfire,

[R] Does a formula object have a "left hand side"

2010-12-13 Thread Erik Iverson
Hello, Does anyone know of a function that will determine whether or not a formula object has a left hand side? I.e., can differentiate between y ~ x + z and ~ x + z Perhaps I'm overlooking the obvious... Thanks! __ R-help@r-project.org mailing l

Re: [R] How to ignore data

2010-12-13 Thread Barry Rowlingson
On Mon, Dec 13, 2010 at 7:36 PM, Steve Sidney wrote: > Oh dear oh dear!!! another arrogant statistician/scientist > > One asks for help and instead one gets an ear full!!! > > So much for the much vaunted helpful R community. > > But thanks anyway, I guess you were trying Steve, we're

Re: [R] How to ignore data

2010-12-13 Thread Ben Bolker
Steve Sidney mweb.co.za> writes: > > Oh dear oh dear!!! another arrogant statistician/scientist > > One asks for help and instead one gets an ear full!!! > > So much for the much vaunted helpful R community. > > But thanks anyway, I guess you were trying > > Steve > I know I shoul

Re: [R] curve

2010-12-13 Thread Sarah Goslee
On Mon, Dec 13, 2010 at 2:12 PM, Ashta wrote: > Thanks Sarah, > >> 1. to shade or color (blue) the curve using the criterion that any values >> greater than 11,000 > > I think I was not clear in the above point. I want shade not the line but > the area under the curve, Here's an example of how to

Re: [R] How to ignore data

2010-12-13 Thread Steve Sidney
Oh dear oh dear!!! another arrogant statistician/scientist One asks for help and instead one gets an ear full!!! So much for the much vaunted helpful R community. But thanks anyway, I guess you were trying Steve On 2010/12/13 08:17 PM, Bert Gunter wrote: Inline below. -- Bert On Mon

[R] stepAIC: plot predicted versus observed

2010-12-13 Thread sergeetienneparent
Hi, stepAIC generic plot function creates useful graphics for the diagnosis of multiple regressions. To create predicted versus observed plots, I use to look for the coefficients, copy them by hand, calculate R², then plot. Is there a more automated way to plot predicted versus observed with its

[R] Post positive reviews

2010-12-13 Thread Eugene Zola
Google’s Huge Change and How it affects you. •Anyone can now post bad reviews and kill your rank. •We post good reviews and improve your rank. •We post good reviews to keep others from killing your rank. Google: Judge, Jury and Online Shopping Executioner Google rank is based on rev

Re: [R] Re : Re : descriptive statistics

2010-12-13 Thread Matthieu Lesnoff
You could also use aggstat() of package tdisplay (available at http://forums.cirad.fr/logiciel-R/viewtopic.php?t=3367). See the help page. > mydata <- data.frame( + y1 = c(NA, rnorm(n = 8, mean = 10, sd = 5), NA), + y2 = c(rep(NA, 2), rnorm(n = 6, mean = 10, sd = 5), rep(NA, 2)), + y3

Re: [R] curve

2010-12-13 Thread Ashta
Thanks Sarah, > 1. to shade or color (blue) the curve using the criterion that any values greater than 11,000 I think I was not clear in the above point. I want shade not the line but the area under the curve, and Your last line of code, segments(x0=mean(test1), y0=0, y1=curveheight) gave me th

Re: [R] predict.lm[e] with formula passed as a variable

2010-12-13 Thread David L Lorenz
Thorn, Here's how I do it: retval <- list(as.name('lm'), formula=as.formula(paste(Response, "~", Explan, sep='')), data=as.name(Data)) #... optionally add other arguments retval <- eval(as.call(retval)) Dave From: "Thaler, Thorn, LAUSANNE, Appl

Re: [R] curve

2010-12-13 Thread Sarah Goslee
Here's one way to do what I think you want: test<- rnorm(5000,1000,100) test1 <- subset(test, subset=(test > 1100)) d <- density(test) plot(d, main="Density of production", xlab="") lines(d$x[d$x > 1100], d$y[d$x > 1100], col="blue", lwd=2) curveheight <- d$

Re: [R] survival package - calculating probability to survive a given time

2010-12-13 Thread Terry Therneau
- --- included message i try to calculate the probabilty to survive a given time by using the estimated survival curve by kaplan meier. What is the right way to do that? as far as is see i cannot use the predict-methods from the survival package? end inclusion The sur

Re: [R] Browsing through a dataframe page by page (like with shell command more)

2010-12-13 Thread Greg Snow
For data frames the best is probably the View function (note capitol V) which opens the data frame in a spreadsheet like window that you can scroll through. For more complicated, list or list-like objects, look at TkListView in the TeachingDemos package. For more general investigation of data o

[R] curve

2010-12-13 Thread Val
Hi All, I generated 5000 samples using the following script test<- rnorm(5000,1000,100) test1 <- subset(test, subset=(test > 1100)) d <- density(test) plot(d, main="Density of production") abline(v=mean(test1) I wanted to do the following but faced diffic

Re: [R] Qs re writing/reading arrays, dataframes

2010-12-13 Thread David Winsemius
On Dec 13, 2010, at 12:20 PM, Roy Shimizu wrote: Hi! I'm just getting started with R (and with the analysis of large datasets in general). I have several beginner-level questions whose answers I have not been able to find, and was hoping one of you would be kind enough to throw me a cluebrick

Re: [R] How to change leaf color by group in hclust plot or how to install A2R package in windows?

2010-12-13 Thread Bryan Hanson
An example is described here that you can adapt: http://r.789695.n4.nabble.com/coloring-leaves-in-a-hclust-or-dendrogram-plot -tt795496.html#a795497 HTH. Bryan * Bryan Hanson Professor of Chemistry & Biochemistry DePauw University, Greencastle IN USA On 12/13/10 12:54 PM, "Soyeon

Re: [R] How to ignore data

2010-12-13 Thread Bert Gunter
Inline below. -- Bert On Mon, Dec 13, 2010 at 9:42 AM, Steve Sidney wrote: > Thanks for the questions. > > 1) The data represents micro-organism counts and a count of zero in  this > case is highly unlikely given the info we have; including the other > participants. ?? Censoring or an experiment

[R] predict.lm[e] with formula passed as a variable

2010-12-13 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Dear all, In a function I paste a string and convert it to a formula which I pass to lm[e]. The idea is to write a function which takes the name of the response variable and the explanatory variable and the data frame as an argument and calculates an lm[e]. (see example below) This works fine, bu

Re: [R] How to print colorful R output??

2010-12-13 Thread Greg Snow
One possibility, though not as simple as what you ask for, is to use etxtStart and friends from the TeachingDemos package. Other possibilities include using gui interfaces to R, possibilities (though they may do more than you ask, and color might be different) include emacs/ess; vim; jgr; and o

Re: [R] How to change leaf color by group in hclust plot or how to install A2R package in windows?

2010-12-13 Thread Tal Galili
What error do you get when using: install.packages("A2R") ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (En

Re: [R] How to ignore data

2010-12-13 Thread Steve Sidney
Thanks for the comments Please see my reply to Stavros - the counts represent organisms and btw both mean and the median are virtually unaffected by the removal of these valuse. Furthermore, experience rather than statistics indicates that these values are in fact gross errors and as you of

[R] Complicated nls formula giving singular gradient message

2010-12-13 Thread Jared Blashka
I'm attempting to calculate a regression in R that I normally use Prism for, because the formula isn't pretty by any means. Prism presents the formula (which is in the Prism equation library as Heterologous competition with depletion, if anyone is curious) in these segments: KdCPM = KdnM*SpAct*Vo

[R] How to change leaf color by group in hclust plot or how to install A2R package in windows?

2010-12-13 Thread Soyeon Kim
I want to change leaf color by group in hclust plot. I've seen several answers about A2R package but I cannot install A2R and Rtools in windows. Do you know how to install A2R package in windows or how to change leaf color by group in hclust plot? Thank you in advance, Soyeon _

Re: [R] Projecting data on a world map using long/lat

2010-12-13 Thread mathijsdevaan
Hi Patrick, Thanks! That worked perfectly! M -- View this message in context: http://r.789695.n4.nabble.com/Projecting-data-on-a-world-map-using-long-lat-tp3081298p3085834.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pro

Re: [R] How to ignore data

2010-12-13 Thread Steve Sidney
Thanks for the questions. 1) The data represents micro-organism counts and a count of zero in this case is highly unlikely given the info we have; including the other participants. 2) The data is submitted in duplicate and then a standardised sum and difference is established and is used to c

Re: [R] Rapache on windows

2010-12-13 Thread Santosh Srinivas
Thanks to R ... I just got myself a new ubuntu setup just an hour back! It feels good! :-) On Mon, Dec 13, 2010 at 8:46 PM, Bos, Roger wrote: > I asked Jeff Horner that question a while back and he said it was Linux > only. He doesn't have time to create a windows version. > > > -Original Me

[R] Qs re writing/reading arrays, dataframes

2010-12-13 Thread Roy Shimizu
Hi! I'm just getting started with R (and with the analysis of large datasets in general). I have several beginner-level questions whose answers I have not been able to find, and was hoping one of you would be kind enough to throw me a cluebrick or two. I have a 6-dimensional numeric array (which

Re: [R] Data permutation

2010-12-13 Thread Gabor Grothendieck
On Mon, Dec 13, 2010 at 11:37 AM, matteop wrote: > > Hello R User, > > I am new in R and trying to migrate from SAS. I have to convert a table that > look like this > > YEAR    FIRM            ID_NAME         VALUE > 1994    Microsoft       John Doe                5 > 1994    Microsoft       Mark

Re: [R] How to ignore data

2010-12-13 Thread Bert Gunter
>> >> Values to be ignored >> >> 0 - zero and 1 this is in addition to NA (null) >> >> The reason is that I need to use the log10 of the values when performing >> the calculation. >> >> Currently I hand massage the data set, about a 100 values, of which less >> than 5 to 10 are in this category. >>

[R] 15' lag of an irregular Time Series

2010-12-13 Thread Vassilios Dimitrakas
Hi everyone, I am new to R and I have a beginner's question on Time Series: I have an irregular time series that goes like this: TIMESTAMP PRICE 2010-11-29 12:29:28 25.255 2010-11-29 12:30:47 25.255 2010-11-29 12:36:58 25.230 2010-11-29 12:43:14 25.235 2010-11-

Re: [R] Re : Re : descriptive statistics

2010-12-13 Thread Ivan Calandra
Do it with aggregate(), something like this should do: aggregate(.~cluster, FUN=summary, data=data) Now if you don't want to run summary(), replace it with the function you'd like. HTH, Ivan Le 12/13/2010 17:17, effeesse a écrit : what am I supposed to put into function(x)? The indicator for

Re: [R] Re : Re : descriptive statistics

2010-12-13 Thread William Revelle
An alternative way of getting summary statistics by a grouping variable is to use describe.by in the psych package: using Jim Lemon's example: library(psych) testmat<-data.frame(sample(1:14,50,TRUE),rnorm(50),runif(50)) #make up the data describe.by(test.mat,testmat[1]#get descriptive st

[R] library(Defaults) throws "evaluation nested too deeply"

2010-12-13 Thread nbest937
Can anybody tell me why this is happening? > library( Defaults) > ls() [1] "class" "foo""mlct" [4] "mlctTheme" "overlayFunction""pct" [7] "pri""primaryFraction""reclassFractions" [10] "reclassMatrix"

[R] Data permutation

2010-12-13 Thread matteop
Hello R User, I am new in R and trying to migrate from SAS. I have to convert a table that look like this YEARFIRMID_NAME VALUE 1994Microsoft John Doe5 1994Microsoft Mark Smith 3 1994Microsoft David Ring

Re: [R] How to ignore data

2010-12-13 Thread Ben Bolker
Steve Sidney mweb.co.za> writes: > > Dear list > > I have quite a small data set in which I need to have the following > values ignored - not used when performing an analysis but they need to > be included later in the report that I write. > > Can anyone help with a suggestion as to how this

Re: [R] How does R compute sums of squares?

2010-12-13 Thread Douglas Bates
On Mon, Dec 13, 2010 at 8:20 AM, Ethan Arenson wrote: > Consider the following missing data problem: > >  y = c(1, 2, 2, 2, 3) > a = factor(c(1, 1, 1, 2, 2)) > b = factor(c(1, 2, 3, 1, 2)) > fit = lm(y ~ a + b) > anova(fit) > >  Analysis of Variance Table > > Response: y >          Df  Sum Sq Mean

Re: [R] Tukey HSD not working

2010-12-13 Thread Peter Ehlers
On 2010-12-13 07:29, PGZC wrote: TukeyHSD(fit) Error in UseMethod("TukeyHSD") : no applicable method for 'TukeyHSD' applied to an object of class "lm" TukeyHSD(anova) Error in UseMethod("TukeyHSD") : no applicable method for 'TukeyHSD' applied to an object of class "function" TukeyHSD

Re: [R] Integration with LaTex and LyX

2010-12-13 Thread Liviu Andronic
On Mon, Dec 13, 2010 at 4:55 PM, Jonathan P Daily wrote: > ?Sweave > > LyX is a bit harder, although you can probably export LyX docs to a *.tex > and Sweave those fairly painlessly. > LyX can play very nicely with Sweave and R. For the 1.6.x series, you could get started here [1]. If that's not e

Re: [R] Re : Re : descriptive statistics

2010-12-13 Thread effeesse
what am I supposed to put into function(x)? The indicator for extracting the subgroups? data is the df. cluster={1,...,14}. This is how I was compiling: "for (i in 1:14) { my.summary<-data$cluster==i c(mean(?),var(?)) summary(var_A~cluster, fun=my.summary,data=data) summary(var_B~cluster, fun=m

[R] odot symbol as a subscript in axes labels

2010-12-13 Thread pilchat
Dear R users, do you know how to print the latex "\odot" symbol subscripted to axes labels? Thank you in advance Gaetano __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Integration with LaTex and LyX

2010-12-13 Thread Jonathan P Daily
?Sweave LyX is a bit harder, although you can probably export LyX docs to a *.tex and Sweave those fairly painlessly. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 "Is the room still a ro

[R] Testing an interaction with a random effect in lmer

2010-12-13 Thread Reed, Nicola
Hi, I was hoping to get some advice regarding the testing of interactions, when one factor is modelled as a random effect... I have a model with binomial error structure where the response variable is the proportion of time spent at the main sett (animals were tracked for 28 consecutive days in

[R] How to ignore data

2010-12-13 Thread Steve Sidney
Dear list I have quite a small data set in which I need to have the following values ignored - not used when performing an analysis but they need to be included later in the report that I write. Can anyone help with a suggestion as to how this can be accomplished Values to be ignored 0 - ze

Re: [R] ggplot2 histograms

2010-12-13 Thread Hadley Wickham
Hi Sandy, The way I'd describe it is that you expected the width parameter of the position adjustment to be relative to the binwidth of the histogram - but it's actually absolute, and it has to be this way because there's currently no way for the position adjustment to know about the parameters of

Re: [R] Tukey HSD not working

2010-12-13 Thread PGZC
TukeyHSD(fit) Error in UseMethod("TukeyHSD") : no applicable method for 'TukeyHSD' applied to an object of class "lm" > TukeyHSD(anova) Error in UseMethod("TukeyHSD") : no applicable method for 'TukeyHSD' applied to an object of class "function" > TukeyHSD(group) Error in UseMethod("TukeyHS

Re: [R] Tukey HSD not working

2010-12-13 Thread PGZC
TukeyHSD(fit) Error in TukeyHSD(fit) : object 'fit' not found > TukeyHSD(anova) Error in UseMethod("TukeyHSD") : no applicable method for 'TukeyHSD' applied to an object of class "function" > TukeyHSD(group) Error in UseMethod("TukeyHSD") : no applicable method for 'TukeyHSD' applied to an

[R] Integration with LaTex and LyX

2010-12-13 Thread Eduardo de Oliveira Horta
Hello, Are there any packages which allow for a good integration between R and LaTex / LyX? I'm interested mainly in automatic (automagic?) imports of plots/graphics. Thanks in advance and best regards, Eduardo de Oliveira Horta [[alternative HTML version deleted]]

Re: [R] How to plot Ellipsoid like function

2010-12-13 Thread Duncan Murdoch
On 13/12/2010 10:13 AM, Uwe Wolfram wrote: Dear R-Users, I am currently trying to fit a tensorial function in its principal coorinate system. The function is given by: 1~(x1^2 + x2^2 + x3^2 - chi0*(x1*x2 + x1*x3 + x2*x3))/eps0^2 + (x1 + x2 + x3)/xi0 Where eps0 = 0.0066, chi0 = -0.66 and xi0 =

Re: [R] Rapache on windows

2010-12-13 Thread Bos, Roger
I asked Jeff Horner that question a while back and he said it was Linux only. He doesn't have time to create a windows version. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Santosh Srinivas Sent: Saturday, December 11, 2010 8:3

[R] How to plot Ellipsoid like function

2010-12-13 Thread Uwe Wolfram
Dear R-Users, I am currently trying to fit a tensorial function in its principal coorinate system. The function is given by: 1~(x1^2 + x2^2 + x3^2 - chi0*(x1*x2 + x1*x3 + x2*x3))/eps0^2 + (x1 + x2 + x3)/xi0 Where eps0 = 0.0066, chi0 = -0.66 and xi0 = 0.011 are obtained from experimental data usi

[R] [R-pkgs] batchfiles 0.6-0

2010-12-13 Thread Gabor Grothendieck
batchfiles is a set of batch, javascript and HTML Application files that are useful for running R and associated programs on Windows. Version 0.6-0 updates them for the new architecture specific directory structure in R 2.12.0 . A few of the lesser used utilities have been dropped. Each batchfil

[R] booklet on using R for biomedical statistics

2010-12-13 Thread Coghlan, Avril
Dear all, I've written a small booklet on using R for biomedical statistics (mostly focussed on cohort and case-control studies), available here under a Creative Commons Attribution 3.0 License : "A Little Book of R for Biomedical Statistics" http://a-little-book-of-r-for-biomedi

Re: [R] check for item in vector

2010-12-13 Thread David L Lorenz
CH, How about any: any("Tiger" == animal) The function which will tell you the index if any match which("Tiger" == animal. You should also look at the match funciton. Dave From: "C.H." To: R-help Date: 12/13/2010 08:50 AM Subject: [R] check for item in vector Sent by: r-help-boun...

Re: [R] check for item in vector

2010-12-13 Thread Jorge Ivan Velez
Hi CH, Check ?is.element ?"%in%" HTH, Jorge On Mon, Dec 13, 2010 at 9:48 AM, C.H. <> wrote: > Dear R users, > > Suppose I have an vector like this: > > animal <- c("Tiger","Panda") > > I would like to know is there any function that check for the > existence of certain item in a vector. > > e

  1   2   >