[R] R Help

2010-04-02 Thread Ryan Cooper
Has anyone programmed the Nonparametric Canonical Correlation method in R? __ 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.html and provide

Re: [R] time series problem: time points don't match

2010-04-02 Thread Brad Patrick Schneid
Gabor: That is not the ideal solution, but it definitely works to provide me with the easier alternative. Thanks for the reply! -- View this message in context: http://n4.nabble.com/time-series-problem-time-points-don-t-match-tp1748387p1748706.html Sent from the R help mailing list archive

[R] Exporting Nuopt from splus to R

2010-04-02 Thread Jp2010
Hi all, Thanks for the wonderful forum with all the valuable help and comments here. I have been a splus user for the past 7 to 8 years and now crossing the mind of changing over to R. Have been doing a lot of reading and one of the main reasons is being an open source and the wonderful things

[R] ODD and EVEN numbers

2010-04-02 Thread girlme80
Excuse me Carl Withoft! For your information, this is not my homework. I'm just helping my friend in a part of her R code. And everytime I ask a question here, it's just a SMALL PART of the 2-pages-program that I am doing. And for your information, the answers that I get, I still think on

Re: [R] ODD and EVEN numbers

2010-04-02 Thread Detlef Steuer
Just to give you a hint for the future: If you ask google for odd, even, R you get a messages from 2003 as second match: --- Dave Caccace wrote: Hi, I'm trying to create a function, jim(p) which varies depending on whether the value of p is odd or even. I was

[R] Biplot for PCA using labdsv package

2010-04-02 Thread Dilys Vela
Hi everyone, I am doing PCA with labdsv package. I was trying to create a biplot graphs in order to observe arrows related to my variables. However when I run the script for this graph, the console just keep saying: *Error in nrow(y) : element 1 is empty; the part of the args list of 'dim'

[R] Odp: Using a string as a variable name - revisited

2010-04-02 Thread Petr PIKAL
Hi Without some insight about foo, list or counts it is impossible to say what is wrong. mat-matrix(1:12, 3,4) colnames(mat)-letters[1:4] DF-as.data.frame(mat) fac-factor(names(DF)) fac [1] a b c d Levels: a b c d ff-fac[3] ff [1] c Levels: a b c d DF[[ff]] [1] 7 8 9 ff-fac[1] DF[[ff]]

Re: [R] roccomp

2010-04-02 Thread Ravi Kulkarni
The ROCR package has methods to compute AUC and related methods. You might want to check it out. Ravi -- View this message in context: http://n4.nabble.com/roccomp-tp1748818p1748903.html Sent from the R help mailing list archive at Nabble.com. __

[R] Derivative of a smooth function

2010-04-02 Thread FMH
Dear All, I've been searching for appropriate codes to compute the rate of change and the curvature of  nonparametric regression model whish was denoted by a smooth function but unfortunately don't manage to do it. I presume that such characteristics from a smooth curve can be determined by

[R] How to save a model in DB and retrieve It

2010-04-02 Thread Daniele Amberti
I'm wondering how to save an object (models like lm, loess, etc) in a DB to retrieve and use it afterwards, an example: wind_ms - abs(rnorm(24*30)*4+8) air_kgm3 - rnorm(24*30, 0.1)*0.1 + 1.1 wind_dg - rnorm(24*30) * 360/7 ms - c(0:25) kw_mm92 - c(0,0,0,20,94,205,391,645,979,1375,1795,2000,2040)

[R] Hat matrix and MSEP

2010-04-02 Thread linda garcia
Dear all, I have 100 x 5 data matrix and 100 x 1 response vector. I have calculated Hat matirx and the diagonal of the matrix. Now I want to know if the diagonals say something about future prediction( Mean square error for preidiction)? Can I get variance explained for future data?

[R] R: Generative Topographic Map

2010-04-02 Thread mauede
I am running GTM on the same datda space points but changing the number of latent space points, the number of basis functions and parameter sigma. I found a combination of such parameters that works fine. On the other hand on page 7 of the paper The Generative Topographic Mapping by Swensen,

[R] plot area: secondary y-axis does not display well

2010-04-02 Thread Muhammad Rahiz
Dear useRs, I'm having a slight problem with plotting on 2 axes. While the following code works alright on screen, the saved output does not turn out as desired i.e. the secondary y-axis does not display fully. Just run the code and look at image output. Suggestions please... thanks,

[R] What should I do regarding DLL attempted to change... warning ?

2010-04-02 Thread Tal Galili
Hi all, The call to: library(rJava) Results in the following warning massage: Warning message: In inDL(x, as.logical(local), as.logical(now), ...) : DLL attempted to change FPU control word from 8001f to 9001f After some searching I found the following explanation: R expects all calls to

[R] Odp: plot area: secondary y-axis does not display well

2010-04-02 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 02.04.2010 12:12:02: Dear useRs, I'm having a slight problem with plotting on 2 axes. While the following code works alright on screen, the saved output does not turn out as desired i.e. the secondary y-axis does not display fully. Just run

Re: [R] time series problem: time points don't match

2010-04-02 Thread Gabor Grothendieck
On Thu, Apr 1, 2010 at 7:08 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Perhaps something like this: library(zoo) library(chron) # read in data Lines1 - date            time            level           temp 2009/10/01 00:01:52.0      2.8797      18.401 2009/10/01 00:16:52.0      

Re: [R] Odp: plot area: secondary y-axis does not display well

2010-04-02 Thread Muhammad Rahiz
Thanks Ivan, Jim and Petr. The output turns out as desired after I've taken your suggestions. Muhammad __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] What should I do regarding DLL attempted to change... warning ?

2010-04-02 Thread Duncan Murdoch
On 02/04/2010 7:01 AM, Tal Galili wrote: Hi all, The call to: library(rJava) Results in the following warning massage: Warning message: In inDL(x, as.logical(local), as.logical(now), ...) : DLL attempted to change FPU control word from 8001f to 9001f After some searching I found the

Re: [R] What should I do regarding DLL attempted to change... warning ?

2010-04-02 Thread Tal Galili
Thanks Duncan and Romain, I'll go and do that. with regards, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

[R] what is the significance of RSq in earth function??

2010-04-02 Thread vibha patel
Hello, I'm using earth function for Multivariate Adaptive Regression splines. what is the significance of RSq in earth function?? following's the code. printed value is of RSq. tr.wage-sample(1:nrow(HCMwage), 0.8*nrow(HCMwage)) tst.wage- (1:nrow(HCMwage))[-tr.wage]

[R] Restricting optimisation algorithm's parameter space in GNLM

2010-04-02 Thread dominikj
Hello, I have a problem. I am using the NLME library to fit a non-linear model. There is a linear component to the model that has a couple parameter values that can only be positive (the coefficients are embedded in a sqrt). When I try and fit the model to data the search algorithm tries

Re: [R] plot area: secondary y-axis does not display well

2010-04-02 Thread Ivan Calandra
Hi Muhammad, The problem is that you set the par() options before creating your png. I've tried, and it works if you do this: ... # x and y png(image.png) par(mar=c(5,5,5,7)+0.1) # inner margin par(oma=c(3,3,3,7))# outer margin ... # rest of your code HTH, Ivan Le 4/2/2010 12:12, Muhammad

[R] timeseries plot

2010-04-02 Thread vibha patel
Hello, I am using plot( ) function to plot time-series. it takes time-series object as an argument but i want to plot predicted data with training set, to compare them. is there any function available? Vibha [[alternative HTML version deleted]]

Re: [R] What should I do regarding DLL attempted to change... warning ?

2010-04-02 Thread Prof Brian Ripley
On Fri, 2 Apr 2010, Duncan Murdoch wrote: On 02/04/2010 7:01 AM, Tal Galili wrote: Hi all, The call to: library(rJava) Results in the following warning massage: Warning message: In inDL(x, as.logical(local), as.logical(now), ...) : DLL attempted to change FPU control word from 8001f to

Re: [R] [R-SIG-Finance] Derivative of a smooth function

2010-04-02 Thread Jeff Ryan
Please keep in mind this question has absolutely nothing to do with finance, and therefore needs to instead be directed to R-help. Thanks in advance for keeping the R-finance list on topic. Jeff On Fri, Apr 2, 2010 at 3:36 AM, FMH kagba2...@yahoo.com wrote: Dear All, I've been searching for 

Re: [R] Derivative of a smooth function

2010-04-02 Thread Ravi Varadhan
Please learn how to use `RsiteSearch' before posting questions to the list: RSiteSearch(derivative smooth function) This should have provided you with plenty of solutions. Ravi. Ravi Varadhan, Ph.D. Assistant Professor,

[R] build Mac distribution for R package

2010-04-02 Thread wenjun zheng
Dear R users, can somebody give me some suggestions about how to build Mac distribution on my own Mac OS Thanks -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] timeseries plot

2010-04-02 Thread Gabor Grothendieck
Here are a few ways: Try this: set.seed(123) TS - ts(1:25 + rnorm(25)) tt - time(TS) tt.pred - end(tt)[1] + 1:10 both - ts(c(TS, predict(lm(TS ~ tt), list(tt = tt.pred ts.plot(both, TS, gpars = list(type = o, col = 2:1, pch = 20)) and read ?ts, ?start, ?ts.plot and next time please provide

[R] Plots don't update with xlab, etc. What am I doing wrong.

2010-04-02 Thread Marshall Feldman
Hi, I've been struggling with this problem the last few days and finally discovered it's happening at a very fundamental level. Going through Stephen Turner's tutorial on ggplot2, I entered these base graphics commands: with(diamonds, plot(carat,price)) with(diamonds,

Re: [R] build Mac distribution for R package

2010-04-02 Thread David Winsemius
On Apr 2, 2010, at 9:26 AM, wenjun zheng wrote: Dear R users, can somebody give me some suggestions about how to build Mac distribution on my own Mac OS It appears you have not read the most basic background information yet: http://cran.r-project.org/doc/manuals/R-admin.pdf -- David.

Re: [R] Plots don't update with xlab, etc. What am I doing wrong.

2010-04-02 Thread David Winsemius
On Apr 2, 2010, at 9:56 AM, Marshall Feldman wrote: Hi, I've been struggling with this problem the last few days and finally discovered it's happening at a very fundamental level. Going through Stephen Turner's tutorial on ggplot2, I entered these base graphics commands: with(diamonds,

[R] (no subject)

2010-04-02 Thread Terry Therneau
I'm using rpart function for creating regression trees. now how to measure the fitness of regression tree??? thanks n Regards, Vibha I read R-help as a digest so often come late to a discussion. Let me start by being the first to directly answer the question: fit - rpart(time ~ age

Re: [R] Summing data based on certain conditions

2010-04-02 Thread Steve Murray
Dear all, Thanks for the contributions so far. I've had a look at these and the closest I've come to solving it is the following: data_ave - ave(data$rammday, by=c(data$month, data$year)) Warning messages: 1: In split.default(x, g) :   data length is not a multiple of split variable 2: In

[R] Cross-validation for parameter selection (glm/logit)

2010-04-02 Thread Jay
If my aim is to select a good subset of parameters for my final logit model built using glm(). What is the best way to cross-validate the results so that they are reliable? Let's say that I have a large dataset of 1000's of observations. I split this data into two groups, one that I use for

[R] POSIX primer

2010-04-02 Thread Doran, Harold
I have not used POSIX classes previously and now have a need to use them. I have sports data with times of some athletes after different events. I need to perform some simple analyses using the times. I think I've figured out how to do this. I just want to confirm with others who have more

Re: [R] Summing data based on certain conditions

2010-04-02 Thread ONKELINX, Thierry
Dear Steve, Multiplying the mean with the number of observations is essentially the same as summing the numbers. Have a look at the plyr packages. library(plyr) ddply(data, c(month, year), function(x){ c(MeanMultiplied = mean(x$ramm) * nrow(x), Sum = sum(x$ramm)) })

Re: [R] POSIX primer

2010-04-02 Thread Gabor Grothendieck
On Fri, Apr 2, 2010 at 10:49 AM, Doran, Harold hdo...@air.org wrote: I have not used POSIX classes previously and now have a need to use them. I have sports data with times of some athletes The main reason to use POSIXct is if you need time zones. If you don't then you might be better off with

[R] Merge failure using zoo package

2010-04-02 Thread e-letter
Readers, Please refer to attached example data files. It seems that the merge function fails for the latter section of the data set. Command terminal output: library(chron) library(zoo) x-read.zoo(test1.csv,header=TRUE,sep=,,FUN=times) y-read.zoo(test2.csv,header=TRUE,sep=,,FUN=times)

Re: [R] Summing data based on certain conditions

2010-04-02 Thread Phil Spector
Steve - Take a closer look at the help page for ave(), especially the ... argument. Try data_ave - ave(data$rammday, data$month, data$year,FUN=mean) (Assuming you want to calculate the mean -- your example didn't specify a function.) - Phil Spector

Re: [R] POSIX primer

2010-04-02 Thread Doran, Harold
Beautiful. Thank you. -Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Friday, April 02, 2010 10:59 AM To: Doran, Harold Cc: r-help@r-project.org Subject: Re: [R] POSIX primer On Fri, Apr 2, 2010 at 10:49 AM, Doran, Harold hdo...@air.org wrote: I have

Re: [R] roccomp

2010-04-02 Thread joann
Thank you, Ravi, I have looked at that package, but I don't see any method to compare two ROC curves. I beleive the method used by roccomp is based on Delong. JoAnn From: Ravi Kulkarni [via R] [ml-node+1748903-1261333028-216...@n4.nabble.com] Sent: Friday,

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
Data files test1, ...2, ...3, ...4 respectively. time1,dataset1 01:01:00,0.73512097 01:01:30,0.34860813 01:02:00,0.61306418 01:02:30,0.01495898 01:03:00,0.27035612 01:03:30,0.69513898 01:04:00,0.46451758 01:04:30,0.61672569 01:05:00,0.82496122 01:05:30,0.34766154 01:06:00,0.69618714

Re: [R] Cross-validation for parameter selection (glm/logit)

2010-04-02 Thread JLucke
Jay Unless I have misunderstood some statistical subtleties, you can use the AIC in place of actual cross-validation, as the AIC is asymptotically equivalent to leave-out-one cross-validation under MLE. Joe Stone, M. An asymptotic equivalence of choice of model by cross-validation and Akaike's

Re: [R] Summing data based on certain conditions

2010-04-02 Thread David Winsemius
On Apr 2, 2010, at 10:36 AM, Steve Murray wrote: Dear all, Thanks for the contributions so far. I've had a look at these and the closest I've come to solving it is the following: data_ave - ave(data$rammday, by=c(data$month, data$year)) Warning messages: 1: In split.default(x, g) :

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
The files only have one data column. What is the meaning of x[,2], etc. ? What is z1? Please provide reproducible code and data all in a single file using this style so its clear what is what. Also please cut down the size of your data to the smallest size that will still illustrate the

Re: [R] Exporting Nuopt from splus to R

2010-04-02 Thread Ben Bolker
Jp2010 mandans_p at yahoo.com writes: From my understanding it is going to be difficult, is that my understanding right.? Probably impossible ... TIBCO, or whoever owns S-PLUS now (I don't pay much attention, so it's hard for me to keep track) does try to achieve as much R-compatibility as

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
On 02/04/2010, Gabor Grothendieck ggrothendi...@gmail.com wrote: The files only have one data column. What is the meaning of x[,2], etc. ? What is z1? I only want to merge one column from one file with one column from another file. With [x,2], I am trying to select the column of data.

[R] R abrupt exit

2010-04-02 Thread jacob
Dear Lists: I recently ran quite annoyance problem while running R on Ubuntu 9.10. When running the program, the system suddenly exit from the R session with the following warnings: # OMP: Hint: This may cause performance degradation and correctness

Re: [R] mcmcglmm starting value example

2010-04-02 Thread Jarrod Hadfield
Dear Ping, It is not possible to pass starting values for the fixed effects. It doesn't make much sense to give starting values for the fixed effects because they can be Gibbs sampled in a single pass conditional on the latent variables and the (co)variance components - after a single

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
The code does not run with the files. I need the requested information, namely a single file containing code and data and that I can just copy into a session without editing and see the result you see. On Fri, Apr 2, 2010 at 11:27 AM, e-letter inp...@gmail.com wrote: On 02/04/2010, Gabor

Re: [R] Exporting Nuopt from splus to R

2010-04-02 Thread Uwe Ligges
On 02.04.2010 01:16, Jp2010 wrote: Hi all, Thanks for the wonderful forum with all the valuable help and comments here. I have been a splus user for the past 7 to 8 years and now crossing the mind of changing over to R. Have been doing a lot of reading and one of the main reasons is being an

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
On 02/04/2010, Gabor Grothendieck ggrothendi...@gmail.com wrote: The code does not run with the files. I need the requested information, namely a single file containing code and data and that I can just copy into a session without editing and see the result you see. I don't understand how I

Re: [R] R abrupt exit

2010-04-02 Thread Peter Ehlers
Google leads to some discussion on the Intel Sofware Network: http://software.intel.com/en-us/forums/showthread.php?t=64585 Be warned: I haven't read the discussion. -Peter Ehlers On 2010-04-02 9:30, jacob wrote: Dear Lists: I recently ran quite annoyance problem while running R on Ubuntu

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
Below is the format that was requested. This has the data followed by the corrected code at the end. There are several things that were wrong: 1. z1[,2] is wrong since z1 is a vector, not a 2d matrix. Ditto for z2. Ideally zoo would have given an error message but in any case its wrong. It

[R] angles

2010-04-02 Thread Tom_R
Hi R users, I would like to construct a sort hybrid vector/scatter plot. My data is in the following format: 3-column x,y,z data-frame in which every row is a separate data-point. The x y columns are coordinates, and the z column contains orientation data (range 0-180 degrees, with East=0

Re: [R] Merge failure using zoo package

2010-04-02 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of e-letter Sent: Friday, April 02, 2010 9:20 AM To: Gabor Grothendieck Cc: r-help@r-project.org Subject: Re: [R] Merge failure using zoo package On 02/04/2010, Gabor

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-02 Thread Michael Friendly
This is a nice example; thanks for providing it in this form. I tried to trim it down to show fewer groups, but ran into the following errors that I can't understand: ## keep species 1:6 dataset - subset(dataset, species 7) Warning message: In Ops.factor(species, 7) : not meaningful for

Re: [R] angles

2010-04-02 Thread Greg Snow
Look at the my.symbols function in the TeachingDemos package. You can get line segments using the ms.arrows function and setting the length argument to 0 (or you can make your own plotting function by copying ms.arrows and replacing the call to arrows with a call to segments). Hope this

Re: [R] How to save a model in DB and retrieve It

2010-04-02 Thread Greg Snow
Look at the serialize function, it may accomplish what you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
On Fri, Apr 2, 2010 at 1:01 PM, William Dunlap wdun...@tibco.com wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of e-letter Sent: Friday, April 02, 2010 9:20 AM To: Gabor Grothendieck Cc: r-help@r-project.org Subject: Re:

Re: [R] Trouble loading package

2010-04-02 Thread Uwe Ligges
On 28.03.2010 21:20, Peter Ehlers wrote: I haven't seen an answer to this yet. Your problem may stem from having defined a variable T. I can replicate your error messages with: T - hello library(RMark) So methinks that this probably indicates that there may be a problem with using T for

Re: [R] R package checking error.

2010-04-02 Thread Uwe Ligges
The error message F used instead of FALSE is pretty clear to me ...: Use FALSE rather than F in your code. Uwe Ligges On 30.03.2010 07:36, Dong H. Oh wrote: Dear useRs, I am trying to build my package (nonpareff) which deals with some models of data envelopment analysis. The building

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-02 Thread RICHARD M. HEIBERGER
Michael and others, Here is my complete ancova example http://astro.ocis.temple.edu/~rmh/HH/hotdog.pdf This example, especially in Figure 6, places them in a context of a Cartesian product of models with the intercept having two levels and slope having three levels. It is based on the ancova

[R] All sub-summands of a vector

2010-04-02 Thread Andy Rominger
Hello, I'd like to take all possible sub-summands of a vector in the quickest and most efficient way possible. By sub-summands I mean for each sub-vector, take its sum. Which is to say: if I had the vector x-1:4 I'd want the sum of x[1], x[2], etc. And then the sum of x[1:2], x[2:3], etc.

[R] Selecting the first row based on a factor

2010-04-02 Thread Sam Albers
Hello there, I have a situation where I would like to select the first row of a particular factor for a data frame (data example below). So that is, I would like to select the first entry when the factor1 =A and then the first row when factor1=B etc. I have thousands of entries so I need some

Re: [R] All sub-summands of a vector

2010-04-02 Thread Jorge Ivan Velez
Hi Andy, Take a look at the rollapply function in the zoo package. require(zoo) Loading required package: zoo x - 1:4 rollapply(zoo(x), 1, sum) 1 2 3 4 1 2 3 4 rollapply(zoo(x), 2, sum) 1 2 3 3 5 7 rollapply(zoo(x), 3, sum) 2 3 6 9 rollapply(zoo(x), 4, sum) 2 10 # all at once sapply(1:4,

Re: [R] Selecting the first row based on a factor

2010-04-02 Thread Erik Iverson
Hello, Sam Albers wrote: Hello there, I have a situation where I would like to select the first row of a particular factor for a data frame (data example below). So that is, I would like to select the first entry when the factor1 =A and then the first row when factor1=B etc. I have thousands

Re: [R] All sub-summands of a vector

2010-04-02 Thread Gabor Grothendieck
There is also rollmean in the zoo package which might be slightly faster since its optimized for that operation. k * rollmean(x, k) e.g. 2 * rollmean(1:4, 2) [1] 3 5 7 will give a rolling sum. runmean in the caTools package is even faster. On Fri, Apr 2, 2010 at 2:31 PM, Jorge Ivan Velez

[R] compare two fingerprint images

2010-04-02 Thread Juan Antonio Gil Pascual
Hello I wanted to compare two fingerprint images. How do you do with R?. Is there a role for cross-correlation of images? Thanks -- = Juan Antonio Gil Pascual Prof. Titular de Métodos de Investigación en Educación correo: j...@edu.uned.es

Re: [R] Selecting the first row based on a factor

2010-04-02 Thread Sam Albers
Thanks! On Fri, Apr 2, 2010 at 11:35 AM, Erik Iverson er...@ccbr.umn.edu wrote: Hello, Sam Albers wrote: Hello there, I have a situation where I would like to select the first row of a particular factor for a data frame (data example below). So that is, I would like to select the

Re: [R] lineplot.CI in sciplot: option ci.fun can't be changed?

2010-04-02 Thread Manuel Morales
For now, just change fun(x) to median(x) (or whatever) in your ci.fun() below. E.g. lineplot.CI(x.factor = dose, response = len, data = ToothGrowth, ci.fun= function(x) c(mean(x)-2*se(x), mean(x)+2*se(x))) Otherwise, maybe the list members could help with a solution. An example that illustrates

Re: [R] Sharing levels across multiple factor vectors

2010-04-02 Thread Jeff Brown
Ah, I finally figured it out: I had asked In both of those cases, why is the [] needed? It's because when on the left hand side of an assignment, the bracket operator attempts to preserve the class and dimension of the object it's subsetting. (Or at least, that's true when the object is a

[R] lineplot.CI in sciplot: option ci.fun can't be changed?

2010-04-02 Thread Tao Shi
hi List and Manuel, I have encounter the following problem with the function lineplot.CI.  I'm running R 2.10.1, sciplot 1.0-7 on Win XP.  It seems like it's a scoping issue, but I couldn't figure it out. Thanks! ...Tao lineplot.CI(x.factor = dose, response = len, data = ToothGrowth)   

[R] panel data

2010-04-02 Thread Geoffrey Smith
Hello, I have an unbalanced panel data set that looks like: ID,YEAR,HEIGHT Tom,2007,65 Tom,2008,66 Mary,2007,45 Mary,2008,50 Harry,2007,62 Harry,2008,62 James,2007,68 Jack,2007,70 Jordan,2008,72 That is, James, Jack, and Jordan are missing a YEAR. Is there any command that will fill in the

Re: [R] All sub-summands of a vector

2010-04-02 Thread Andy Rominger
Great, thanks for your help. I tried: x - 1:1 y - lapply(1:1,function(t){t*runmean(x,t,alg=fast,endrule=trim)}) and it worked in about 90 sec. Thanks again, Andy On Fri, Apr 2, 2010 at 3:43 PM, Gabor Grothendieck ggrothendi...@gmail.comwrote: There is also rollmean in the zoo

[R] mouse-clicking on xy-plot

2010-04-02 Thread Nuno Prista
Hi, I seem to recall coming across a function that allowed one to mouse-click on an xy-plot and obtain x and y coordinates. Can anyone remind me its name? Thanks, Nuno __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Simple plot of values and error bars: Is there an existing function for this

2010-04-02 Thread John Kane
In an OpenOffice.org forum someone asked if it was possible to plot some raw data and then add a line for the confidence interval. Example at  http://www.graphpad.com/help/Prism5/scatter%20-%20grouped.png While it may be possible to do this in OOo's spreadsheet program it looks nasty (both to

Re: [R] mouse-clicking on xy-plot

2010-04-02 Thread Erik Iverson
Are you thinking of ?identify ? Nuno Prista wrote: Hi, I seem to recall coming across a function that allowed one to mouse-click on an xy-plot and obtain x and y coordinates. Can anyone remind me its name? Thanks, Nuno __ R-help@r-project.org

[R] my mail to post

2010-04-02 Thread nicolas nicolas
nmola...@gmail.com -- Att: Nicolás Molano [[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.org/posting-guide.html and

Re: [R] mouse-clicking on xy-plot

2010-04-02 Thread Walmes Zeviani
You can use identify() to obtain coordinates from plotted points but if you want any coordinates you could use locator(): plot(1:10) loc - locator(n=3) str(loc) List of 2 $ x: num [1:3] 2.3 5.4 8.29 $ y: num [1:3] 6.15 8.33 2.6 points(loc$x, loc$y, col=2) Walmes. - ..ooo0

[R] optim doesnt work with my function

2010-04-02 Thread nmolanogunal
#Hello, i have created this function, but optim doesnt maximize it, just return the value at the inits W-function(l){ w-rep(0,dim(D)[1]) for(i in 1:dim(D)[1]){ w[i]-PAitk(D[i,],D[-i,],l) } return(prod(w)) } #D is a matrix with entires in {0,1}, l is a vector which length(l)= dim(D)[2] #PAitk is

Re: [R] panel data

2010-04-02 Thread David Winsemius
On Apr 2, 2010, at 3:39 PM, Geoffrey Smith wrote: Hello, I have an unbalanced panel data set that looks like: ID,YEAR,HEIGHT Tom,2007,65 Tom,2008,66 Mary,2007,45 Mary,2008,50 Harry,2007,62 Harry,2008,62 James,2007,68 Jack,2007,70 Jordan,2008,72 That is, James, Jack, and Jordan are missing a

[R] model reparameterization

2010-04-02 Thread casperyc
== y=c(100,200,300,400,500) treatment=c(1,2,3,3,4) block=c(1,1,2,3,3) summary(lm(y~as.factor(treatment)+as.factor(block))) == The aim is to find a model that can estimate the comparison between treatment 1 with 2 and treatment 3

Re: [R] [R-sig-DB] How to save a model in DB and retrieve It

2010-04-02 Thread Jeff Ryan
A very simple option, since you're only looking to efficiently store and retrieve, is something like a key-value store. There is a new rredis (redis) package on CRAN, as well as the RBerkeley (Oracle Berkeley DB) package. RBerkeley is as simple as db_put() and db_get() calls where you specify a

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-02 Thread Peter Ehlers
On 2010-04-02 11:07, Michael Friendly wrote: This is a nice example; thanks for providing it in this form. I tried to trim it down to show fewer groups, but ran into the following errors that I can't understand: ## keep species 1:6 dataset - subset(dataset, species 7) Warning message: In

[R] Extracting 'SOME' values from a linear model.

2010-04-02 Thread HouseBandit
I have a regression model that I have used on some data and to look at its accuracy compared to some other models I have been extracting the same 10% of the real data to perform a sum of squares calculation this is what I have tried but it gives me the '0.9*length(t)' fitted value and the

Re: [R] Using GIS data in R

2010-04-02 Thread Rolf Turner
On 2/04/2010, at 4:37 AM, Scott Duke-Sylvester wrote: I have a simple problem: I need to load a ERSI shapefile of US states and check whether or not a set of points are within the boundary of these states. I have the shapefile, I have the coordinates but I'm having a great deal of difficulty

Re: [R] Extracting 'SOME' values from a linear model.

2010-04-02 Thread David Winsemius
On Apr 2, 2010, at 5:14 PM, HouseBandit wrote: I have a regression model that I have used on some data and to look at its accuracy compared to some other models I have been extracting the same 10% of the real data to perform a sum of squares calculation this is what I have tried but it

Re: [R] Extracting 'SOME' values from a linear model.

2010-04-02 Thread HouseBandit
my goal is to return the selected fitted values and then perform a sum of squares calcuation with them. I have looked at 'list' etc but cant return anything. Its either all of the fitted values or just the first and last of the sub set that I need. Cheers -- View this message in context:

Re: [R] Cross-validation for parameter selection (glm/logit)

2010-04-02 Thread Steve Lianoglou
Hi, On Fri, Apr 2, 2010 at 9:14 AM, Jay josip.2...@gmail.com wrote: If my aim is to select a good subset of parameters for my final logit model built using glm(). What is the best way to cross-validate the results so that they are reliable? Let's say that I have a large dataset of 1000's of

[R] vector length help using prcomp

2010-04-02 Thread JRsalvelinus
Hi I am doing PCA using prcomp and when I try to get predicted values for the different PC's the number of data points is always one less than in my original data set. This is a problem because it prevents me from doing any post-hoc analysis due to the fact that my dependent variables are one

Re: [R] Cross-validation for parameter selection (glm/logit)

2010-04-02 Thread Bert Gunter
Inline below: Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Steve Lianoglou Sent: Friday, April 02, 2010 2:34 PM To: Jay Cc: r-help@r-project.org Subject: Re: [R] Cross-validation for

Re: [R] Extracting 'SOME' values from a linear model.

2010-04-02 Thread David Winsemius
On Apr 2, 2010, at 5:32 PM, HouseBandit wrote: my goal is to return the selected fitted values ... Which were never really selected. ... and then perform a sum of squares calcuation with them. I have looked at 'list' etc but cant return anything. Its either all of the fitted values or

[R] Arellano -- how to generate data for y given t

2010-04-02 Thread forgotmystatslol
See topic -- View this message in context: http://n4.nabble.com/Arellano-how-to-generate-data-for-y-given-t-tp1749656p1749656.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] lineplot.CI in sciplot: option ci.fun can't be changed?

2010-04-02 Thread Tao Shi
Thanks, Manuel! Subject: Re: lineplot.CI in sciplot: option ci.fun can't be changed? From: manuel.a.mora...@williams.edu To: shi...@hotmail.com CC: r-help@r-project.org; mmora...@williams.edu Date: Fri, 2 Apr 2010 14:22:33 -0400 For now, just

Re: [R] Extracting 'SOME' values from a linear model.

2010-04-02 Thread HouseBandit
David Winsemius wrote: On Apr 2, 2010, at 5:32 PM, HouseBandit wrote: my goal is to return the selected fitted values ... Which were never really selected. ... and then perform a sum of squares calcuation with them. I have looked at 'list' etc but cant return anything. Its

[R] tetrachoric correlations

2010-04-02 Thread HAKAN DEMIRTAS
Hi, Is there any R library/package that calculates tetrachoric correlations from given marginals and Pearson correlations among ordinal variables? Inputs to polychor function in polycor package are either contingency tables or ordinal data themselves. I am looking for something that takes

[R] compare multiple values with vector and return vector

2010-04-02 Thread Joris Meys
Dear all, I have a vector, and for each element I want to check whether it is equal to any element from another vector. I want a vector of logical values with the length of the first one as return. In R this would be : x - 1:10 sapply(x,function(y){any(y==c(2,3,4))}) [1] FALSE TRUE TRUE

Re: [R] compare multiple values with vector and return vector

2010-04-02 Thread Rolf Turner
On 3/04/2010, at 11:35 AM, Joris Meys wrote: Dear all, I have a vector, and for each element I want to check whether it is equal to any element from another vector. I want a vector of logical values with the length of the first one as return. In R this would be : x - 1:10

[R] Problems with PDF/Latex when building a package

2010-04-02 Thread Erin Hodgess
Dear R People: I'm building a packages on an Ubuntu Karmic Koala 9.10 system and am getting the following errors: * checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors found: ! Font T1/ptm/m/n/10=ptmr8t at 10.0pt

  1   2   >