Re: [R] editors for R

2009-10-21 Thread Tobias Verbeke
Hi Mark, After reviewing the IDE/Script Editors article at sciviews.org, I wanted to pose a quick question here to see if anyone can offer an opinion or commentary about GUI editors that can be installed in a Windoze environment that allow editing/saving of remote .R files and running R programs

Re: [R] Problem using the source-function within R-functions

2009-10-21 Thread Johan Lassen
Hi Giovanni, Thanks for your reply. I can make the function work after parsing the code directly into R. The problem arise after compiling the function into a package and then calling the function, because the files inside "source()" seems to be missing. I tried to include the sourced files in th

[R] slope calculation

2009-10-21 Thread ms.com
Dear all I am new R user, and trying to learn more. I am doing linear regression analysis in R with my data. I am trying to find the way to calculate the slope value (coefficient of x) to degree of slope. Please give me idea on this. Thanking you in anticipation Warm regardMS

[R] problems with randomSurvivalForest

2009-10-21 Thread giovanni parrinello
summary(ma.dati2$death.status)<- censoring Min. 1st Qu. Median Mean 3rd Qu. Max. NA's 0.0 0.0 0.0 0.05332 0.0 1.0 39.0 ## > summary(ma.dati2$time.death)<--- time Min. 1st Qu. MedianMean 3rd Qu.Max.NA'

[R] Solved problems with randomSurvivalForest

2009-10-21 Thread giovanni parrinello
Only a confusion with two dataset with similar names... Sorry Giovanni [[alternative HTML version deleted]] __ 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.o

Re: [R] How to create a legend that automatically reads the values from two vectors?

2009-10-21 Thread Jim Lemon
On 10/21/2009 01:30 AM, jcano wrote: betav<-c(0.78,0.94,0.88,0.41,0.59,4.68) etav<-c(235.6,59.5,31.2,8.7,3.2,1174) Hi Javier, Maybe not exactly what you want, but try: addtable2plot(2,8,rbind(betav,etav),bty="o", display.colnames=FALSE,display.rownames=TRUE) using your own x and y coordin

[R] three related time series with different resolutions

2009-10-21 Thread William Simpson
I have three time series, x, y, and z, and I want to analyse the relations between them. However, they have vastly different resolutions. I am writing to ask for advice on how to handle this situation in R. x is a stimulus, and y and z are responses. x is a rectangular pulse 4 sec long. Its onset

Re: [R] Putting names on a ggplot - fortune candidate?

2009-10-21 Thread Jim Lemon
On 10/21/2009 01:59 AM, hadley wickham wrote: It currently works (because I can't figure out how to make it an error) but you really should not do it. Please pardon my nomination, Hadley, but that is just too good to pass up. Jim __ R-help@r-pro

[R] linear regression: Is there a way to get the results of lm as variables

2009-10-21 Thread CE.KA
Hi R users I used R to get the results of a linear regression reg<-lm(y~x) here are the results: # Call: # lm(formula = donnees$txi7098 ~ donnees$txs7098) # # Residuals: # Min

Re: [R] Transparent Bands in R

2009-10-21 Thread Jim Lemon
On 10/21/2009 09:40 AM, mnstn wrote: Hello All, My question is regarding the attached plot. I would like to have multiple transparent green bands running the length (yaxis) of the plot the width of which is determined by the green lines at y=0 in the plot. Can you suggest a way to do it?

Re: [R] linear regression: Is there a way to get the results of lm as variables

2009-10-21 Thread Achim Zeileis
On Wed, 21 Oct 2009, CE.KA wrote: Hi R users I used R to get the results of a linear regression reg<-lm(y~x) here are the results: # Call: # lm(formula = donnees$txi7098 ~ donnees$txs7098) # # Residuals: # Min1QMedian3Q Max # -0.037971 -0.013373 -0.004947

Re: [R] three related time series with different resolutions

2009-10-21 Thread William Simpson
PS I think one way to get the average waveforms I want from the analysis is using cross-correlation, but again the multiple scale problem is present. On Wed, Oct 21, 2009 at 9:56 AM, William Simpson wrote: > I have three time series, x, y, and z, and I want to analyse the > relations between them

[R] Bootstrapping confidence intervals

2009-10-21 Thread Charlotta Rylander
Hello, We are a group of PhD students working in the field of toxicology. Several of us have small data sets with N=10-15. Our research is mainly about the association between an exposure and an effect, so preferrably we would like to use linear regression models. However, most of the time our da

[R] ggplot2: Histogram with negative values on x-axis doesn't work

2009-10-21 Thread sebastian . rohrer
I have a dataset that contains numbers between -10 and 0. E.g. x = c(-9.23, -9.56, -1.40, ...) If I no do a > qplot(x, geom="histogram") I get the error: Error: position_stack requires non-overlapping x intervals Strangely, the following both work: > qplot(x * -1, geom="histogram") > qplot(x+100,

[R] problem with pdf in batch mode

2009-10-21 Thread guillaume Le Ray
Hi all R Users, I am using R in batch mode to do an automatic reporting, I'm saving all the picture in wmf. When I'm launching manually the batch file(.bat) it's working but when I'm lauching the batch file from the server I have in the outputfile the following erro message: Error in device.call(

[R] "eliminate" characters of one data.frame col, using another column

2009-10-21 Thread Luis F
Dear Maling list, I have a data.frame with three columns. I want to produce a fourth column which is result of "eliminating" the characters present in the second and third colum from the first. Example: a b c 1 f f 2 j h 3

[R] Keeping package sources for recompilation with new R version?

2009-10-21 Thread Rainer M Krug
Hi I am using Ubuntu Hardy, and I installing many packages from source. I am keeping my R packages fairly up to date. My question is: is there a way, of keeping the source packages, so that when I am installing a new version of R, an update.packages(checkBuilt=TRUE) will only fetch the packages w

[R] Help with time series

2009-10-21 Thread ehxpieterse
Hi there, I am having trouble getting the plotting of multiple time series to work. I have used RBloomberg to download data, which I then convert to a data frame. After I have calculated my new index values, I would like to plot the new index. My problem is that I can't get the plot feature to

[R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Tony Breyal
Dear all, Lets say I have the following data frame: > set.seed(1) > col1 <- c(rep('happy',9), rep('sad', 9)) > col2 <- rep(c(rep('alpha', 3), rep('beta', 3), rep('gamma', 3)),2) > dates <- as.Date(rep(c('2009-10-13', '2009-10-14', '2009-10-15'),6)) > score=rnorm(18, 10, 3) > df1<-data.frame(col1=

Re: [R] ggplot2: Histogram with negative values on x-axis doesn't work

2009-10-21 Thread Karl Ove Hufthammer
In article , sebastian.roh...@basf.com says... > I have a dataset that contains numbers between -10 and 0. E.g. x = > c(-9.23, -9.56, -1.40, ...) > If I no do a > > qplot(x, geom="histogram") > I get the error: > Error: position_stack requires non-overlapping x intervals > Strangely, the following

Re: [R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Benilton Carvalho
aves = aggregate(df1$score, by=list(col1=df1$col1, col2=df1$col2), mean) results = merge(df1, aves) b On Oct 21, 2009, at 9:03 AM, Tony Breyal wrote: Dear all, Lets say I have the following data frame: set.seed(1) col1 <- c(rep('happy',9), rep('sad', 9)) col2 <- rep(c(rep('alpha', 3), rep('

Re: [R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Chuck Cleland
On 10/21/2009 7:03 AM, Tony Breyal wrote: > Dear all, > > Lets say I have the following data frame: > >> set.seed(1) >> col1 <- c(rep('happy',9), rep('sad', 9)) >> col2 <- rep(c(rep('alpha', 3), rep('beta', 3), rep('gamma', 3)),2) >> dates <- as.Date(rep(c('2009-10-13', '2009-10-14', '2009-10-15'

Re: [R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Karl Ove Hufthammer
In article <800acfc0-2c3c-41f1-af18-3b52f7e43...@jhsph.edu>, bcarv...@jhsph.edu says... > aves = aggregate(df1$score, by=list(col1=df1$col1, col2=df1$col2), mean) > results = merge(df1, aves) Or, with the 'plyr' package, which has a very nice syntax: library(plyr) ddply(df1, .(col1, col2), trans

Re: [R] Bootstrapping confidence intervals

2009-10-21 Thread Ista Zahn
John Fox has a nice explanation here: http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-bootstrapping.pdf -Ista On Wed, Oct 21, 2009 at 6:38 AM, Charlotta Rylander wrote: > Hello, > > We are a group of PhD students working in the field of toxicology. Several > of us have small data se

[R] SVM probability output variation

2009-10-21 Thread Anders Carlsson
Dear R:ers, I'm using the svm from the e1071 package to train a model with the option "probabilities = TRUE". I then use "predict" with "probabilities = TRUE" and get the probabilities for the data point belonging to either class. So far all is well. My question is why I get different result

[R] combining multiple 3D graphs

2009-10-21 Thread Michael Ralph M. Abrigo
Hi all! I am a grad stat student and is fairly new in using R. I am doing a regression tree in one of my problem sets. I have already identified the cut-points (using Stata) for the regression. My problem is how to graph the fitted values of z against the independent variables x and y. Basically, I

Re: [R] re ferring to data of previous rows

2009-10-21 Thread Gabor Grothendieck
Iff dd is your data frame then: dd$prev <- ave(dd$of, dd$Id, FUN = function(x) c(NA, head(x, -1))) On Wed, Oct 21, 2009 at 2:55 AM, clion wrote: > > Dear Rlers, > in the following dataset I would like to insert a new column that refers to > the data of the previous row. > My question is whether

Re: [R] slope calculation

2009-10-21 Thread Eik Vettorazzi
Hi MS, I think it is simple trigonometry: atan(beta) or in degrees instead of radians atan(beta)*360/(2*pi) hth. ms.com schrieb: Dear all I am new R user, and trying to learn more. I am doing linear regression analysis in R with my data. I am trying to find the way to calculate the slope

Re: [R] three related time series with different resolutions

2009-10-21 Thread William Simpson
I wasn't clear: x and z are pulse *trains* with irregular gaps between pulses. > > x is a rectangular pulse 4 sec long. Its onset and offset are known > with sub-millisecond precision. The onset varies irregularly -- it > doesn't fall on neat 1/2 sec or sec boundaries for example. > > y is a sampl

Re: [R] Problem using the source-function within R-functions

2009-10-21 Thread Duncan Murdoch
On 10/21/2009 3:53 AM, Johan Lassen wrote: Hi Giovanni, Thanks for your reply. I can make the function work after parsing the code directly into R. The problem arise after compiling the function into a package and then calling the function, because the files inside "source()" seems to be missing

Re: [R] linear regression: Is there a way to get the results of lm as variables

2009-10-21 Thread Jorge Ivan Velez
Hi CE.KA, Take a look at the following: # Data set.seed(123) x <- rnorm(100) y <- 2 + 1.5*x + rnorm(100) # Regression model reg <- lm(y ~ x) # The summary summary(reg) # Objects present in the summary() names(summary(reg)) # Extracting the coefficients summary(reg)$coeff HTH, Jorge On Wed,

Re: [R] How to average subgroups in a dataframe? (not sure how to apply aggregate(..))

2009-10-21 Thread Tony Breyal
Thank you all for your responses, i have now achieved the desired output for my own real data using your suggestions. I will also have to look into this 'plyr' package as i have noticed that it gets mentioned a lot. On 21 Oct, 13:33, Karl Ove Hufthammer wrote: > In article <800acfc0-2c3c-41f1-af

Re: [R] combining multiple 3D graphs

2009-10-21 Thread Duncan Murdoch
On 10/21/2009 9:03 AM, Michael Ralph M. Abrigo wrote: Hi all! I am a grad stat student and is fairly new in using R. I am doing a regression tree in one of my problem sets. I have already identified the cut-points (using Stata) for the regression. My problem is how to graph the fitted values of z

[R] Subsetting/modifying a symbolic formula

2009-10-21 Thread Bryan Hanson
Hello All.. Please consider the following: y <- rnorm(20, mean = 10) f1 <- as.factor(rep(c("A", "B", "B", "A"), 5)) f2 <- as.factor(rep(c("C", "D"), 10)) testdata <- data.frame(y, f1, f2) testFunc <- function(formula, data, ...) { #mf <- model.frame(formula, data) kw.res <- kruskal.test(

[R] formula and model.frame

2009-10-21 Thread Doran, Harold
Suppose I have the following function myFun <- function(formula, data){ f <- formula(formula) dat <- model.frame(f, data) dat } Applying it with this sample data yields a new dataframe: qqq <- data.frame(grade = c(3, NA, 3,4,5,5,4,3), score = rnorm(8), idVar = c(

Re: [R] Subsetting/modifying a symbolic formula

2009-10-21 Thread Gabor Grothendieck
Here is one way: > fo <- y ~ f1 * f2 > one.x <- lapply(all.vars(fo[[3]]), function(x) { fo[[3]] <- as.name(x); fo }) > one.x [[1]] y ~ f1 [[2]] y ~ f2 On Wed, Oct 21, 2009 at 11:29 AM, Bryan Hanson wrote: > Hello All.. > > Please consider the following: > > y <- rnorm(20, mean = 10) > f1 <- as

[R] Temperature Prediction Model

2009-10-21 Thread Aneeta
Greetings! As part of my research project I am using R to study temperature data collected by a network. Each node (observation point) records temperature of its surroundings throughout the day and generates a dataset. Using the recorded datasets for the past 7 days I need to build a prediction m

Re: [R] SVM probability output variation

2009-10-21 Thread Steve Lianoglou
Hi Anders, On Oct 21, 2009, at 8:49 AM, Anders Carlsson wrote: Dear R:ers, I'm using the svm from the e1071 package to train a model with the option "probabilities = TRUE". I then use "predict" with "probabilities = TRUE" and get the probabilities for the data point belonging to either c

[R] date conversion not as i would have expected

2009-10-21 Thread clair.crossup...@googlemail.com
Good day, i imported some data into R from Excel. By using the edit() function, this is what one of the dates looks like in R: > x <- structure(1254351600, class = c("POSIXt", "POSIXct"), tzone = "") [1] "2009-10-01 BST" However, when i do the following, the date changes: > as.Date(x, formate="

[R] squared euclidean distance

2009-10-21 Thread Caro B.
Dear R-Help-Team, I would like to cluster my data using the ward-method. In several papers I read (e.g. Bahrenberg) that it is neccesary to use the "squared euclidean distance" with the ward-method. Unfortunatelly I cannot find this term in r as a method for measuring the distance. Does anybody

Re: [R] Transparent Bands in R

2009-10-21 Thread mnstn
Hello Megha and Jim, Thanks for your comments. The green bands actually correspond to data that looks like: 13 0 42 0 183 0 186 0 187 0 192 0 194 0 and so on. I plotted them using: plot(v[,1],3+v[,2],type="h",col="gray",lwd=5) and the rest of the data using points. The result is here: http://www.t

Re: [R] Temperature Prediction Model

2009-10-21 Thread Steve Lianoglou
Hi, On Oct 21, 2009, at 12:31 PM, Aneeta wrote: Greetings! As part of my research project I am using R to study temperature data collected by a network. Each node (observation point) records temperature of its surroundings throughout the day and generates a dataset. Using the recorded data

Re: [R] SVM probability output variation

2009-10-21 Thread Anders Carlsson
Hi again, and thank you Steve for your reply! > Hi Anders, > > On Oct 21, 2009, at 8:49 AM, Anders Carlsson wrote: > > > Dear R:ers, > > > > I'm using the svm from the e1071 package to train a model with the > > option "probabilities = TRUE". I then use "predict" with > > "probabilities = TRUE"

[R] Question on mixed effect models with LME

2009-10-21 Thread Peter Flom
Good afternoon Using R 2.9.2 on a machine running Windows XP I have a longitudinal data set, with data on schools and their test scores over a four year period. I have centered year, and run the following m1.mod1 <- lme(fixed = math_1 ~ I(year-2007.5)*TFC_, data = long,

[R] How to find the interception point of two linear fitted model in R?

2009-10-21 Thread FMH
Dear All, Let have 10 pair of observations, as shown below. ## x <- 1:10 y <- c(1,3,2,4,5,10,13,15,19,22) plot(x,y) ## Two fitted  models, with ranges of [1,5] and [5,10], can be easily fitted separately by lm function as shown below: ##

[R] Missing data and LME models and diagnostic plots

2009-10-21 Thread Peter Flom
Hello Running R2.9.2 on Windows XP I am puzzled by the performance of LME in situations where there are missing data. As I understand it, one of the strengths of this sort of model is how well it deals with missing data, yet lme requires nonmissing data. Thus, m1.mod1 <- lme(fixed = math_

Re: [R] How to find the interception point of two linear fitted model in R?

2009-10-21 Thread Paul Johnson
On Wed, Oct 21, 2009 at 12:09 PM, FMH wrote: > Dear All, > > Let have 10 pair of observations, as shown below. > > ## > x <- 1:10 > y <- c(1,3,2,4,5,10,13,15,19,22) > plot(x,y) > ## > > > Two fitted  models, with ranges of [1,5] and [5,10], can be easily fit

Re: [R] Subsetting/modifying a symbolic formula

2009-10-21 Thread Bryan Hanson
Thanks Gabor, you taught me two useful things: all.vars, and the fact that a formula object always has length 3. Problem solved. Bryan On 10/21/09 11:57 AM, "Gabor Grothendieck" wrote: > Here is one way: > >> fo <- y ~ f1 * f2 >> one.x <- lapply(all.vars(fo[[3]]), function(x) { fo[[3]] <- as

Re: [R] squared euclidean distance

2009-10-21 Thread Sarah Goslee
You can calculate the Euclidean distance with dist() and then square it. Sarah On Wed, Oct 21, 2009 at 11:35 AM, Caro B. wrote: > Dear R-Help-Team, > > > I would like to cluster my data using the ward-method. In several papers I > read (e.g. Bahrenberg) that it is neccesary to use the "squared e

Re: [R] formula and model.frame

2009-10-21 Thread Charles C. Berry
Emulate lm. myFun <- function(formula, data, na.action, id, ...){ mf <- match.call(expand.dots = FALSE) m <- match(c("formula", "data", "id", "na.action"), names(mf), 0L) mf <- mf[c(1L, m)] mf$drop.unused.levels <- TRUE mf[[1L]] <- as.name("model.frame") mf

Re: [R] squared euclidean distance

2009-10-21 Thread Gavin Simpson
On Wed, 2009-10-21 at 17:35 +0200, Caro B. wrote: > Dear R-Help-Team, > > > I would like to cluster my data using the ward-method. In several papers I > read (e.g. Bahrenberg) that it is neccesary to use the "squared euclidean > distance" with the ward-method. Unfortunatelly I cannot find this te

[R] News on R "s largest corporate partner REVolution Computing and SPSS CEO:

2009-10-21 Thread Ajay ohri
Start the REvolution without me... http://danesecooper.blogs.com/divablog/2009/10/start-the-revolution-without-me.html *From Danese Cooper's Blog* Some of you may have become aware of REvolution Computing, a commercial open source company organized around the R

Re: [R] News on R "s largest corporate partner REVolution Computing and SPSS CEO:

2009-10-21 Thread David M Smith
It is clearly inappropriate for me or anyone else from REvolution to comment on matters pertaining to any employee or ex-employee. I would further add that this is a highly inappropriate use of this list. Apologies to all concerned. # David Smith On Wed, Oct 21, 2009 at 1:51 PM, Ajay ohri wrote:

Re: [R] Temperature Prediction Model

2009-10-21 Thread Steve Lianoglou
Hi, In order to have more eyes on this, I'm CCing this back to lease (please try to keep further correspondence here, since most mail to *this* address of mine probably gets lost if it's not coming in from a list to begin with) ... I'm not really sure I have much to say about your problem

Re: [R] Temperature Prediction Model

2009-10-21 Thread Gabor Grothendieck
Check out the forecast package. On Wed, Oct 21, 2009 at 12:31 PM, Aneeta wrote: > > Greetings! > > As part of my research project I am using R to study temperature data > collected by a network. Each node (observation point) records temperature of > its surroundings throughout the day and generat

Re: [R] SVM probability output variation

2009-10-21 Thread Steve Lianoglou
Howdy, On Oct 21, 2009, at 1:05 PM, Anders Carlsson wrote: Yes, exactly that. In your example, though, the variation seems to be a lot smaller. I'm guessing that has to with the data. If I instead output the decision values, the whole procedure is fully reproducible, i.e. the exact same va

[R] reshaping data

2009-10-21 Thread Lo, Ken
Hi all, I have a matrix of correlation values between all pairwise comparison in an experiment. For example, I have 2 time points (1,2) each in triplicate. Thus, I have the following matrix 1-1 1-2 1-3 2-1 2-2 2-3 1-1 NA ... ... ... ... ... 1-2 ... NA ... ... ... ...

Re: [R] News on R "s largest corporate partner REVolution Computingand SPSS CEO:

2009-10-21 Thread Charles Annis, P.E.
David: Do you mean "inappropriate" or "embarrassing?" How would we R-ians know what has happened at REVolution were it not for Ajay's note? Were you planning a press release? Something like, "47% of Revolution summarily fired. Nobody left with more than a year of experience...?" Charles A

Re: [R] News on R "s largest corporate partner REVolution Computing and SPSS CEO:

2009-10-21 Thread Rolf Turner
On 22/10/2009, at 7:20 AM, David M Smith wrote: It is clearly inappropriate for me or anyone else from REvolution to comment on matters pertaining to any employee or ex-employee. I would further add that this is a highly inappropriate use of this list. Oh, I dunno. I have the impress

Re: [R] Missing data and LME models and diagnostic plots

2009-10-21 Thread Mark Difford
Peter Flom wrote: >> I am puzzled by the performance of LME in situations where there are >> missing data. As I >> understand it, one of the strengths of this sort of model is how well it >> deals with missing >> data, yet lme requires nonmissing data. You are confusing missing data with an

[R] random numbers between 0 and 1

2009-10-21 Thread carol white
Hi, To generate random numbers between 0 and 1, do you use rnorm followed by dnrom? for ex, for 10 variables a = rnorm(10) > a [1] -0.87640764 -0.95842391 -1.33434559 -0.63844932 -1.69829393 0.80010865 [7] -0.01026882 -0.23887516 2.29912600 -1.38352143 > dnorm(a) [1] 0.27171985 0.25202507 0.

Re: [R] News on R "s largest corporate partner REVolution Computingand SPSS CEO:

2009-10-21 Thread Duncan Murdoch
On 10/21/2009 3:09 PM, Charles Annis, P.E. wrote: David: Do you mean "inappropriate" or "embarrassing?" How would we R-ians know what has happened at REVolution were it not for Ajay's note? Were you planning a press release? I think he already did post a note on his blog mentioning that

Re: [R] News on R "s largest corporate partner REVolution Computing and SPSS CEO:

2009-10-21 Thread kulwinder banipal
Well I do not think that "this is highly inappropriate use of this list". I am sure you new designation of VP makes you feel all more powerful but your authority does not extend to this list. It should continue to rest with Core R team. It seems had this list been under your control (i.e revolu

Re: [R] random numbers between 0 and 1

2009-10-21 Thread Erik Iverson
Uniformly distributed random numbers between 0 and 1? Try ?runif > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of carol white > Sent: Wednesday, October 21, 2009 2:26 PM > To: r-h...@stat.math.ethz.ch > Subject: [R] random num

Re: [R] News on R "s largest corporate partner REVolution Computing and SPSS CEO:

2009-10-21 Thread Rolf Turner
On 22/10/2009, at 8:27 AM, kulwinder banipal wrote: Well I do not think that "this is highly inappropriate use of this list". I am sure you new designation of VP makes you feel all more powerful but your authority does not extend to this list. It should continue to rest with Core R team.

Re: [R] random numbers between 0 and 1

2009-10-21 Thread Gábor Csárdi
I would suggest to use the generator at http://submoon.freeshell.org/pix/valium/dilbert_rng.jpg and subtract 8.5. Best, Gabor On Wed, Oct 21, 2009 at 9:25 PM, carol white wrote: > Hi, > To generate random numbers between 0 and 1, do you use rnorm followed by > dnrom? for ex, for 10 variables >

Re: [R] News on R "s largest corporate partner REVolution Computingand SPSS CEO:

2009-10-21 Thread Barry Rowlingson
On Wed, Oct 21, 2009 at 8:09 PM, Charles Annis, P.E. wrote: > David: > > Do you mean "inappropriate" or "embarrassing?" > > How would we R-ians know what has happened at REVolution were it not for > Ajay's note?  Were you planning a press release?  Something like, "47% of > Revolution summarily fi

[R] FW: reshaping data

2009-10-21 Thread Lo, Ken
I apologize for the previous post using HTML. Haven't posted for a while and e-mail client default. Best, Ken Hi all, I have a matrix of correlation values between all pairwise comparison in an experiment.  For example, I have 2 time points (1,2) each in triplicate. Thus, I have the follow

Re: [R] random numbers between 0 and 1

2009-10-21 Thread Barry Rowlingson
On Wed, Oct 21, 2009 at 8:37 PM, Gábor Csárdi wrote: > I would suggest to use the generator at > http://submoon.freeshell.org/pix/valium/dilbert_rng.jpg > and subtract 8.5. You may laugh (indeed I did) but some medical trials have used (and poss still do) telephone-a-human random numbers. When d

Re: [R] random numbers between 0 and 1

2009-10-21 Thread Rolf Turner
On 22/10/2009, at 8:25 AM, carol white wrote: Hi, To generate random numbers between 0 and 1, do you use rnorm followed by dnrom? for ex, for 10 variables a = rnorm(10) a [1] -0.87640764 -0.95842391 -1.33434559 -0.63844932 -1.69829393 0.80010865 [7] -0.01026882 -0.23887516 2.2991260

Re: [R] News on R "s largest corporate partner REVolution Computingand SPSS CEO:

2009-10-21 Thread Rolf Turner
On 22/10/2009, at 8:37 AM, Barry Rowlingson wrote: On Wed, Oct 21, 2009 at 8:09 PM, Charles Annis, P.E. wrote: David: Do you mean "inappropriate" or "embarrassing?" How would we R-ians know what has happened at REVolution were it not for Ajay's note? Were you planning a press release? S

Re: [R] SVM probability output variation

2009-10-21 Thread Anders Carlsson
Hi, > > > If I instead output the decision values, the whole procedure is > > fully reproducible, i.e. the exact same values are returned when I > > retrain the model. > > By the decision values, you mean the predict labels, right? The output of decision values can be turned on in the predict.s

Re: [R] Temperature Prediction Model

2009-10-21 Thread Aneeta
The data that I use has been collected by a sensor network deployed by Intel. You may take a look at the network at the following website http://db.csail.mit.edu/labdata/labdata.html The main goal of my project is to simulate a physical layer attack on a sensor network and to detect such an attac

Re: [R] Missing data and LME models and diagnostic plots

2009-10-21 Thread Peter Flom
I wrote >>> I am puzzled by the performance of LME in situations where there are >>> missing data. As I >>> understand it, one of the strengths of this sort of model is how well it >>> deals with missing >>> data, yet lme requires nonmissing data. > Mark Difford replied >You are confusing mi

Re: [R] News on R "s largest corporate partner REVolution Computing and SPSS CEO:

2009-10-21 Thread Ajay ohri
I am sorry. I will refrain from this in the future (using the list which is a technical resource and not a forum inappropriately). My blog has my views on it -http://decisionstats.com so I wont cut and paste on that. I would like to applaud David's team at REvolution for finally releasing an Ubu

Re: [R] date conversion not as i would have expected

2009-10-21 Thread Duncan Mackay
Hi This is on WinXP with regional settings as EST (we are now on DST but I run EST) R2.9.2 x <- structure(1254351600, class = c("POSIXt", "POSIXct"), tzone = "") > x [1] "2009-10-01 09:00:00 EST" > as.POSIXlt(x) [1] "2009-10-01 09:00:00 EST" > as.Date(x, formate="%Y-%m-%d" ) [1] "2009-09-30"

[R] Problems coercing to timeSeries

2009-10-21 Thread John Kerpel
Hi all. I'm suddenly having problems with the following: > FUT10Y<-read.table("C:\\FUT10YR.csv",header=TRUE,sep=",") > head(FUT10Y) Date PX_OPEN PX_HIGH PX_LOW PX_LAST 1 1/5/1999 119. 119.1875 118.5312 118.6250 2 1/6/1999 118.5938 118.8750 118.2812 118.8438 3 1/7/1999 118.9062 1

[R] How do I vectorize this loop....

2009-10-21 Thread chipmaney
Basically I need to use the following data to calculate a squared error for each Sample based on the expected Survival for the zone. Basically, this code has Live/Dead for each sample, and I need to calculate the square error based on the Expected Mean (ie, Survival). The code looks up the expec

[R] increase size of filled box in a legend

2009-10-21 Thread Janet Choate
Hello R user community, can anyone tell me how to increase the size of a filled box in a legend? thanx, Janet [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read t

[R] drawing a line indicating extent of each factored data series in multipanel lattice xyplot

2009-10-21 Thread Dan Kortschak
Hi, Am am plotting aggregated frequency data (extracted from an RDBMS) relating to DNA sequence features for each of the human chromosomes as described in the table chromosomes below (the frequency data is in a table 'hits' that has a value (or not) for each of a set of bins across each chromosome

[R] sorting table output

2009-10-21 Thread Erin Hodgess
Dear R People: Suppose I have the following output: > table(xx) xx A C G T 13 12 10 15 I would like to have the output sorted in descending order by "height" or frequency. But when I do the following: > rev(table(xx)) xx T G C A 15 10 12 13 > the output is sorted by the names rather

Re: [R] sorting table output

2009-10-21 Thread Stefan Evert
I would like to have the output sorted in descending order by "height" or frequency. But when I do the following: rev(table(xx)) xx T G C A 15 10 12 13 Err, I guess you meant to write sort(table(xx)) here? Cheers, Stefan __ R-help

Re: [R] sorting table output

2009-10-21 Thread Rolf Turner
On 22/10/2009, at 11:16 AM, Erin Hodgess wrote: Dear R People: Suppose I have the following output: table(xx) xx A C G T 13 12 10 15 I would like to have the output sorted in descending order by "height" or frequency. But when I do the following: rev(table(xx)) xx T G C A 15 1

Re: [R] How do I vectorize this loop....

2009-10-21 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of chipmaney > Sent: Wednesday, October 21, 2009 2:58 PM > To: r-help@r-project.org > Subject: [R] How do I vectorize this

[R] Use of the command 'replicate'

2009-10-21 Thread Manny Gomez
Dear R users, I'd like to ask u whether you know how to sort out the following: I'm trying to reproduce a dataset of clusters, and for that I need to build up a cluster index (inside a function) using the command "replicate" as follows: dataset<- function( clusters=100, cluster.size=50, outcom

[R] multiple imputation with mix package

2009-10-21 Thread Kurt Smith
I am running into a problem using 'mix' for multiple imputation (over continuous and categorical variables). For the way I will be using this I would like to create an imputation model on some training data set and then use this model to impute missing values for a different set of individuals (i.

[R] melting columns

2009-10-21 Thread Thibault Grava
Hello, I'm using R to run a acoustic analysis software called Seewave. I ask the code to extract a list of variables from my recording, and the program give ONE table for each of these. The tables consist of a two column data.frame with the time in column 1 and the frequency in column 2. Howev

[R] loop vs. apply(): strange behavior with data frame?

2009-10-21 Thread Roberto Perdisci
Hi everybody, I noticed a strange behavior when using loops versus apply() on a data frame. The example below "explicitly" computes a distance matrix given a dataset. When the dataset is a matrix, everything works fine. But when the dataset is a data.frame, the dist.for function written using nes

[R] Calculating Random Effects Coefficients from lmer

2009-10-21 Thread Matthew Schneider
Hello all, I am new to the list serve but hope to contribute what I can. For now, however, I hope to tap into all your knowledge about mixed effects models. Currently, I am running a mixed effects model on a time series panel data. For this model I want to find out the fixed and random effect for

[R] Error: NA/NaN/Inf in foreign function call (arg 1)

2009-10-21 Thread Rainier Sabangan
Hi, Below is the code that is giving me this error message: #=== #The code below results in error: Error: NA/NaN/Inf in foreign function #call (arg 1) #=== A=rep(c(-1,1

[R] simulating AR() using a

2009-10-21 Thread CJ Rubio
good day everyone! i have a time series (andong.ts) and fitted and AR() model using the following code andong.ts <- ts(read.table("D:/.../andong.csv", header = TRUE), start = c(1966,1), frequency = 1) ar(andong.ts) Call: ar(x = andong) Coefficients: 1 2 3 0.3117 0.0607 0.

[R] help in simulating AR models

2009-10-21 Thread CJ Rubio
good day everyone! i have a time series (andong.ts) and fitted and AR() model using the following code andong.ts <- ts(read.table("D:/.../andong.csv", header = TRUE), start = c(1966,1), frequency = 1) ar(andong.ts) Call: ar(x = andong) Coefficients: 1 2

Re: [R] Question on mixed effect models with LME

2009-10-21 Thread Kingsford Jones
On Wed, Oct 21, 2009 at 11:06 AM, Peter Flom wrote: ... > I have a longitudinal data set, with data on schools and their test scores > over a four year period.  I have centered year, and run the following > > > m1.mod1 <- lme(fixed = math_1 ~ I(year-2007.5)*TFC_, >               data = long, >  

[R] Plot log scale

2009-10-21 Thread R_help Help
Hi - a simple question. I know that on plot one can set log="xy" to set scale on both axes to log scale. I use this to plot autocorrelation of a slow decaying autocorrelated process. It has some points that are zero or slightly negative and cause this plot to return error. I'm wondering if there is

Re: [R] Missing data and LME models and diagnostic plots

2009-10-21 Thread Kingsford Jones
Mixed models based on likelihood methods can often handle missing observations within subjects, but they not do well with missing individual elements in the design matrices (think unit nonresponse vs item nonresponse in the survey world). Continuing with the example I recently sent to you set.see

Re: [R] loop vs. apply(): strange behavior with data frame?

2009-10-21 Thread Jim Holtman
try running Rprof on the two examples to see what the difference is. what you will probably see is a lot of the time on the dataframe is spent in accessing it like a matrix ('['). Rprof is very helpful to see where time is spent in your scripts. Sent from my iPhone On Oct 21, 2009, at 17:1

Re: [R] Missing data and LME models and diagnostic plots

2009-10-21 Thread Mark Difford
Hi Peter, >> See e.g. Hedeker and Gibbons, Longitudinal Data Analysis, which >> repeatedly stresses that >> mixed models provide good estimates if the data are missing at random. This may be true. However, one of the real strengths of LME is that it handles unbalanced designs, which is a differ

Re: [R] re ferring to data of previous rows

2009-10-21 Thread clion
thanks, it works! well, now it shows 1s instead of 0s and 2s instead of 1s, which fine with me...but could you explain me what this function actually does? Gabor Grothendieck wrote: > > Iff dd is your data frame then: > > dd$prev <- ave(dd$of, dd$Id, FUN = function(x) c(NA, head(x, -1))) > >

[R] Converting a Vector into a 2-level Factor

2009-10-21 Thread ntyson
Hello Everyone, Let's say I have a vector as follows: vowels = c("aa", "aa", "ah", "ao", "eh) I want to make a factor consisting of two levels: the things that are "aa" and those that are not "aa". How would I do that? I tried using factor(vowels, levels=c("aa", "~aa"), exclude=NULL), but

Re: [R] melting columns

2009-10-21 Thread christiaan pauw
Hi Thibault Please give a short example of what the data looks now like and what you want it to look like. regards Christiaan 2009/10/22 Thibault Grava > Hello, > > I'm using R to run a acoustic analysis software called Seewave. I ask the > code to extract a list of variables from my recordin

  1   2   >