[R] what`s best memory - speed - pc for R?

2010-06-07 Thread Johannes Reichl
Hi all, I need to do massive simulations in the next two years. I estimated that I will need about 64GB memory, if I do not want to split up the calculations. Additionally I would like to have it as fast as possible. Can R handle multi-core processors and can all standard operating systems

Re: [R] Computing day-over-day log return for a matrix containing multiple time series

2010-06-07 Thread sayan dasgupta
Hope this helps a - matrix(runif(150),nrow=3,ncol=50) p2r - function(x) 100 * diff(log(x)) t(apply(a,1,function(x){p2r(c(x))})) On Mon, Jun 7, 2010 at 8:41 AM, Anyi Zhu anyi@gmail.com wrote: Hi all, Thanks a lot for anyone's help in advance. I am trying to find a way to compute

[R] barchart but with boxes

2010-06-07 Thread Daisy Englert Duursma
Hello r-help. I have been working on making a graph and have several solutions but they are tedious at best. Here is an example dataset: catg-(c(1,2,3,2,4,3,2,1,4,3,1)) min-(c(1,2,3,3,4,5,6,6,3,2,1)) max -(c(10,6,8,6,7,3,10,9,10,8,9)) cbind(min,max,catg) What I want to create is a basically a

Re: [R] what`s best memory - speed - pc for R?

2010-06-07 Thread Joshua Wiley
Hello Johannes, These topics have been fairly well discussed on the helplist, so a search will return you a lot more results. Regarding memory, there are options besides simply increasing RAM (although if you have the funds, by all means). Look at http://crantastic.org/packages/ff and

Re: [R] Help on Multiple Structural break unit root test

2010-06-07 Thread Matthieu Stigler
Dear Eric This test is unfortunately AFAIK not implemented in R. You can nevertheless use the similar Zivot and Andrews test in package urca. library(urca) ?ur.za Best Matthieu Le 06. 06. 10 12:00, r-help-requ...@r-project.org a écrit : Message: 24 Date: Sat, 5 Jun 2010 15:45:29 +0100

Re: [R] barchart but with boxes

2010-06-07 Thread Deepayan Sarkar
On Sun, Jun 6, 2010 at 11:53 PM, Daisy Englert Duursma daisy.duur...@gmail.com wrote: Hello r-help. I have been working on making a graph and have several solutions but they are tedious at best. Here is an example dataset: catg-(c(1,2,3,2,4,3,2,1,4,3,1)) min-(c(1,2,3,3,4,5,6,6,3,2,1))

Re: [R] Computing day-over-day log return for a matrix containing multiple time series

2010-06-07 Thread Patrick Burns
Actually the 'apply' is not necessary. The original poster has stocks as rows rather than the customary columns, so the following should suffice: retmat - diff(log(t(pricemat))) Questions that are specifically financial should be sent to r-sig-finance (you need to subscribe before posting).

[R] average two sets of columns

2010-06-07 Thread Yuan Jian
Hi R experts. how can I average two sets of columns? dd - data.frame(b = c(chr2, chr1, chrY, chr13, chrX),     w=11:15, x = 1:5, y = c(8, 3, 9, 9,7),    z = c(1, 1, 1, 2, 8)) expected result for mean(w,x) and mean(y,z) is 1  chr2 6  4.5 2  chr1 7  2 3  chrY 8  5 4 chr13 9  5.5 5  chrX

[R] Subsetting subsets of data.frames

2010-06-07 Thread Jeff08
Hey Everyone, I have been stumped by this all day. Basically, I have a data.frame of multiple columns. Of concern are id date For some reason, oftentimes there are duplicates of data with the same date. I would like to remove the duplicates per different id (removing duplicate dates for the

[R] ols function in rms package

2010-06-07 Thread Mark Seeto
Hello, I have a couple of questions about the ols function in Frank Harrell's rms package. Is there any way to specify variables by their column number in the data frame rather than by the variable name? For example, library(rms) x1 - rnorm(100, 0, 1) x2 - rnorm(100, 0, 1) x3 - rnorm(100, 0,

Re: [R] paste together a string object later to be utilized in a function

2010-06-07 Thread moleps islon
I'm sorry for not clearer describing my motive with this-- So this is what I'm trying to do- Take a survival object and utilize it in ggplot. ggkm-function(time,event,stratum) { m2s-Surv(time,as.numeric(event)) fit - survfit(m2s ~ stratum) f$time-fit$time f$surv-fit$surv

Re: [R] average two sets of columns

2010-06-07 Thread Dennis Murphy
Hi: Using the plyr package, summarise(dd, b = b, wx = (w + x)/2, yz = (y + z)/2) b wx yz 1 chr2 6 4.5 2 chr1 7 2.0 3 chrY 8 5.0 4 chr13 9 5.5 5 chrX 10 7.5 HTH, Dennis On Sun, Jun 6, 2010 at 9:53 PM, Yuan Jian jayuan2...@yahoo.com wrote: Hi R experts. how can I average two

Re: [R] Computing day-over-day log return for a matrix containing multiple time series

2010-06-07 Thread Gabor Grothendieck
You can use diff.zoo like this: library(zoo) z - zoo(matrix(1:24, 6)) z diff(log(z)) # also try diff(z, arith = FALSE) - 1 See ?diff.zoo and read the three zoo vignettes (pdf documents): vignette(package = zoo) # lists them vignette(zoo) etc. On Sun, Jun 6, 2010 at 11:11 PM, Anyi Zhu

Re: [R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-07 Thread Oliver
Joris Meys jorismeys at gmail.com writes: There might be a way doing that in R, but if you really need to take measures of a picture in some standardized way, I suggest you take a look at ImageJ. More than R that seems the right tool for the job. Some people have been experimenting with

Re: [R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-07 Thread Gregoire Pau
The package EBImage provides general purpose functionality for the reading, writing, analysis and displaying of images. library(EBImage) x = readImage('lena.gif') display(x) ImageJ is OK to carry out some image processing operations. But if you need to perform quantitative image analysis

Re: [R] Subsetting subsets of data.frames

2010-06-07 Thread Uwe Ligges
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Uwe Ligges On 07.06.2010 09:01, Jeff08 wrote: Hey Everyone, I have been stumped by this all day. Basically, I have a data.frame of multiple

Re: [R] paste together a string object later to be utilized in a function

2010-06-07 Thread Joris Meys
It helps if you provide sample data, so we can try some things out ourselves. Right now, I can't run your function without guessing how your data might look like. Yet, try something like this : ts - list(a=1:5) names(ts$a) - letters[1:5] n - length(names(ts$a)) tmp -

Re: [R] Robust Asymptotic Statistics (RobASt)

2010-06-07 Thread Dr. Matthias Kohl
Dear Alex, after installation of ROptRegTS there should be a folder scripts in the package directory of ROptRegTS which includes some further examples. If you are assuming normal errors you should switch to package RobRex which is optimized for normal errors. There you will also find a folder

Re: [R] prettyR

2010-06-07 Thread Jim Lemon
On 06/07/2010 02:49 AM, Iasonas Lamprianou wrote: Hi all, does anyone have any practical examples of how this command can be used in prettyR? add.value.labels(x,value.labels) I mean, can we have the SPSS style of using numbers and/or labels if we want to? Thank you for your time Hi Jason,

[R] prewhiten

2010-06-07 Thread nuncio m
HI all., I have some univariate time series that need to be prewhitened. HOw this can be performed in R. I am thinking of to fit an ARIMA model and substract this from the original series. Is this the correct way THanks in advance nuncio -- Nuncio.M Research Scientist National Center for

Re: [R] prettyR

2010-06-07 Thread Iasonas Lamprianou
Thank you, I'll have a go and if I have more questions I'll probably come back to you... Dr. Iasonas Lamprianou Assistant Professor (Educational Research and Evaluation) Department of Education Sciences European University-Cyprus P.O. Box 22006 1516 Nicosia Cyprus Tel.: +357-22-713178 Fax:

Re: [R] prettyR

2010-06-07 Thread Iasonas Lamprianou
Thank you, I'll have a go and if I have more questions I'll probably come back to you... Dr. Iasonas Lamprianou Assistant Professor (Educational Research and Evaluation) Department of Education Sciences European University-Cyprus P.O. Box 22006 1516 Nicosia Cyprus Tel.: +357-22-713178 Fax:

Re: [R] barchart but with boxes

2010-06-07 Thread Jim Lemon
On 06/07/2010 04:53 PM, Daisy Englert Duursma wrote: Hello r-help. I have been working on making a graph and have several solutions but they are tedious at best. Here is an example dataset: catg-(c(1,2,3,2,4,3,2,1,4,3,1)) min-(c(1,2,3,3,4,5,6,6,3,2,1)) max-(c(10,6,8,6,7,3,10,9,10,8,9))

Re: [R] prewhiten

2010-06-07 Thread Achim Zeileis
On Mon, 7 Jun 2010, nuncio m wrote: HI all., I have some univariate time series that need to be prewhitened. HOw this can be performed in R. That depends on what exactly you want to do for prewhtening. For example, if you want to prewhiten using an AR(1) model, you could apply ar() and then

Re: [R] barchart but with boxes

2010-06-07 Thread ONKELINX, Thierry
Dear Daisy, This is easy woth ggplot2. Use geom_crossbar() and set the middle bar at the minimum of maximum. library(ggplot2) dataset - data.frame(catg = (c(1,2,3,2,4,3,2,1,4,3,1)), min = (c(1,2,3,3,4,5,6,6,3,2,1)), max = (c(10,6,8,6,7,3,10,9,10,8,9))) ggplot(dataset, aes(x = catg, y = min,

Re: [R] Greek letters and formatted text

2010-06-07 Thread S Ellison
The ?plotmath page and the example ## How to combine math and numeric variables : should be helpful...? Thomas Bschorr bsch...@phys.ethz.ch 05/06/2010 10:36:42 Hi, I desperately try to do s.th. like m=1.23455 sig=0.84321 plot(1,1) text(0.8,1,sprintf(Sigma=%1.2f±%1.2f,m,sig)) where

Re: [R] Computing day-over-day log return for a matrix containing multiple time series

2010-06-07 Thread Anyi Zhu
I did not realise making a zoo object is that convenient. Thanks a lot Gabor. -Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: June-07-10 5:20 AM To: anyi@gmail.com Cc: r-help@r-project.org Subject: Re: [R] Computing day-over-day log return for a

[R] Polar coordinate

2010-06-07 Thread ogbos okike
Greetings to you all. I have two datasets - Time and magnitude. For a particular location, the magnitude of the parameter varies with time. I wish to obtain a polar coordinate distribution of time (0-24h) and magnitudes so as to visualize how magnitude varies with different times of the day

Re: [R] R2HTML problem

2010-06-07 Thread Joris Meys
Err, sorry, forget my previous message. It has nothing to do with Tinn-R or Eclipse. If you save that code in a file and you use the source command in the console, you get the same output. Tinn-R and Eclipse both source the code to R instead of sending it line by line. To get what you want, you

Re: [R] Wrong symbol rendering in plots (Ubuntu)

2010-06-07 Thread Yvonnick Noel
Hello Ben, Does the workaround pointed out later in the thread you're responding to (from the last paragraph of a very long 'Note' section of ?pdf) help? Well, I did not try to edit my fonts.conf but I feel this is not a PDF issue. I have no problem to have greek letters correctly rendered

[R] fit data with y = x^-1

2010-06-07 Thread Leo Leo
Dear list, I am getting weired with fitting data with a 1/x-polynomial. Suggest I have the following data: x - c(1,2,3,4,5,6,7) y - c(100,20,4,2,1,.3,.1) I may fit this with a linear model fit1 = lm(y ~ I(x)) Getting plot out of this model I applied library(polynom) pol1 =

[R] raw data form .CEL file

2010-06-07 Thread aabid
Hi I am new in using R. I am facing problem getting the raw data like the mean value, standard deviation value form the .CEL file. Please help me, how can I get these raw information from a .CEL file into an exel file? Thanks -- View this message in context:

Re: [R] Computing day-over-day log return for a matrix containing multiple time series

2010-06-07 Thread Anyi Zhu
Thanks a lot Sayan, I'll give it a try and let you know how it goes. From: sayan dasgupta [mailto:kitt...@gmail.com] Sent: June-07-10 2:13 AM To: anyi@gmail.com Cc: r-help@r-project.org Subject: Re: [R] Computing day-over-day log return for a matrix containing multiple time series

[R] Odp: Subsetting subsets of data.frames

2010-06-07 Thread Petr PIKAL
Hi some example would be helpful. r-help-boun...@r-project.org napsal dne 07.06.2010 09:01:27: Hey Everyone, I have been stumped by this all day. Basically, I have a data.frame of multiple columns. Of concern are id date For some reason, oftentimes there are duplicates of data

Re: [R] Subsetting subsets of data.frames

2010-06-07 Thread jim holtman
subset(x, !duplicated(paste(x$id, x$date)) On Mon, Jun 7, 2010 at 3:01 AM, Jeff08 jefferyd...@gmail.com wrote: Hey Everyone, I have been stumped by this all day. Basically, I have a data.frame of multiple columns. Of concern are id date For some reason, oftentimes there are duplicates

[R] Odp: fit data with y = x^-1

2010-06-07 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 07.06.2010 14:28:58: Dear list, I am getting weired with fitting data with a 1/x-polynomial. Suggest I have the following data: x - c(1,2,3,4,5,6,7) y - c(100,20,4,2,1,.3,.1) I may fit this with a linear model fit1 = lm(y ~ I(x)) fit1 =

Re: [R] raw data form .CEL file

2010-06-07 Thread Joris Meys
All questions about manipulations of sequence data (guess that's the CEL file you're talking about...) can better be asked on the specific mailing list of BioConductor : http://www.bioconductor.org/docs/mailList.html And please, don't swear in church any more. We don't put things in Excel files.

Re: [R] Onequestion

2010-06-07 Thread Ben Bolker
Xiongqing Zhang xqzhang85 at yahoo.com writes: Dear Mr. or Ms.,   I used the R-software to run the zero-inflatoin negative binomial model, but I could not get the results. And the error message is solve.default(as.matrix(fit$gaussian)) . In the model, I introduced 3 dummy variables. I do

[R] open files from ftp site

2010-06-07 Thread Benoit Wastine
Hello, I'm running R 2.10.1 on Windows XP. I'd like to read some files from a ftp site, but I don't how to do it. I've tried the functions url, download.file but each time I have a message cannot open URL 'ftp://ftp.cea.fr' .. and I don't kwow why .. Thanks for the help Benoit -- Benoit

Re: [R] ols function in rms package

2010-06-07 Thread Frank E Harrell Jr
On 06/06/2010 10:49 PM, Mark Seeto wrote: Hello, I have a couple of questions about the ols function in Frank Harrell's rms package. Is there any way to specify variables by their column number in the data frame rather than by the variable name? For example, library(rms) x1- rnorm(100, 0, 1)

[R] Patch for legend.position={left,top,bottom} in ggplot2

2010-06-07 Thread Karsten Loesing
Hi Hadley and everyone, here's a patch for ggplot2 that fixes the behavior of opts(legend.position={left,top,bottom}). If you try the following code in an unmodified ggplot2 options(warn = -1) suppressPackageStartupMessages(library(ggplot2)) data - data.frame( x = c(1, 2, 3, 4, 5, 6), y

Re: [R] Test

2010-06-07 Thread Ted Harding
Greetings Moderators! I moderated the message below just now (one of two identical test messages). I rejected it, with a covering note to the author (John Munroe mun...@gmail.com, who does not appear to be subscribed to the list) that I was doing so because approving it would serve no useful

Re: [R] Test

2010-06-07 Thread Ted Harding
Apologoes for sending a message to R-help that should have gone to the moderators' mailing-list. I had overlooked that the From: in the MIME-attached messsage was different from the From: in the covering message, and I replied to the wrong address. Ted. On 07-Jun-10 14:00:02, Ted Harding wrote:

[R] plotting predicted values for time series.

2010-06-07 Thread Erin Hodgess
Dear R People: I found the following code on the Internet: x - co2 m - HoltWinters(x, alpha=.1, beta=0, gamma=0) p - predict(m, n.ahead=240, prediction.interval=T) plot(m, predicted.values=p) and it works fine. My question: is there an equivalent for ARIMA objects, please? When I tried,

[R] graphical representation of a correlation between 3 variables (~30 datapoints)

2010-06-07 Thread Georg Ehret
Dear Ms and Mr R, I am seeking a visually appealing presentation of 3 variables (~30 datapoints) that are correlated and that should to into the same direction. The objective is to show that they do go in the same direction and what differences there might be while also giving an idea of the

Re: [R] graphical representation of a correlation between 3 variables (~30 datapoints)

2010-06-07 Thread Erik Iverson
reproducible example needed. Georg Ehret wrote: Dear Ms and Mr R, I am seeking a visually appealing presentation of 3 variables (~30 datapoints) that are correlated and that should to into the same direction. The objective is to show that they do go in the same direction and what

Re: [R] Generalized DCC GARCH ML estimation

2010-06-07 Thread Matthieu Stigler
Dear Anonymous I suggest you to have a look on the code in package ccgarch, which might help you in seeing how this have been done. A useful information would be to know what kind of optimization algorithm the authors use. best Matthieu Le 07. 06. 10 12:00, r-help-requ...@r-project.org a

Re: [R] graphical representation of a correlation between 3 variables (~30 datapoints)

2010-06-07 Thread Jorge Ivan Velez
Hi Georg, Take a look at ?pairs as well as [1] and [2]. HTH, Jorge [1] http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=159 [2] http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=149 On Mon, Jun 7, 2010 at 11:16 AM, Georg Ehret wrote: Dear Ms and Mr R, I am

Re: [R] Polar coordinate

2010-06-07 Thread Charles C. Berry
On Mon, 7 Jun 2010, ogbos okike wrote: Greetings to you all. I have two datasets - Time and magnitude. For a particular location, the magnitude of the parameter varies with time. I wish to obtain a polar coordinate distribution of time (0-24h) and magnitudes so as to visualize how magnitude

[R] plotting predicted values for time series. Solution

2010-06-07 Thread Erin Hodgess
Dear R People: A very fine solution exists in the forecast package, by using plot.forecast. Thanks though! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com

Re: [R] Howto modify a drawn graph with igraph

2010-06-07 Thread Uwe Ligges
See ?plot.igraph, example: plot(g, layout=mlayout, vertex.label.color = red, vertex.color = green, vertex.frame.color = blue, edge.color = orange, edge.width = 1 + (1:18)/2 ) Uwe Ligges On 06.06.2010 17:58, Etienne Cuvelier wrote: Hello, I am using the igraph package,

Re: [R] Computing day-over-day log return for a matrix containingmultiple time series

2010-06-07 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of sayan dasgupta Sent: Sunday, June 06, 2010 11:13 PM To: anyi@gmail.com Cc: r-help@r-project.org Subject: Re: [R] Computing day-over-day log return for a matrix

[R] Multiply Two Dataframes

2010-06-07 Thread Bert Jacobs
Hi, I have the following two dataframes (Df1 and Df2): Df1 has a layout like ID Location Var1 Var2 Var3 . Var20 A Loc2 1 11. 1 A Loc1 0 10. 1 B Loc1 0 00. 0 A Loc3

Re: [R] Multiply Two Dataframes

2010-06-07 Thread ONKELINX, Thierry
Dear Bert, The easiest thing would be to merge both datasets and then multiply the corresponding columns. both - merge(df1, df2) both[, 3:22] * both[, 23:42] HTH, Thierry -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org namens Bert Jacobs Verzonden: ma 7-6-2010 20:29 Aan:

[R] exepath error in seqaln

2010-06-07 Thread yangfan1
Hi everyone,  I am using bio3d package for some sequence analysis because of its nice integrated MUSCLE execution. However, I have been encountering some errors while I was running seqaln function, which calls for installed MUSCLE program. In my case, I stored the MUSCLE program on the desktop

Re: [R] paste together a string object later to be utilized in a function

2010-06-07 Thread Greg Snow
Does the collapse argument to the paste function do what you want? Possibly nested inside another paste. -- 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

[R] Help with seting up comparison

2010-06-07 Thread Bart Joosen
Hi, I tried on this, but couldn't figure it out: Suppose I have a dataframe as follows: dat - data.frame(Day=rep(rep(c(1,2), each=4),2), Animal = rep(c(1,2), each=8), Count=c(rnorm(8, 100), rnorm(8,90))) 2 animals are being examined on 2 different days. Count is the result. Now I need to point

[R] as.integer

2010-06-07 Thread aledanda
Hi, Is there a way to recursively change the variables imported with read.table(..) - and then attached with attach(..) - from as.factor to as.integer? I have about 9 variables that are now recognized as factors but I need to do statistics on them so I need to change them in as.integer. It

[R] Source of chickwts data

2010-06-07 Thread Chirok Han
I'm not sure if this is the right mailing list. My apologies if I'm sending the question to the wrong mailing list. (The r-packages list moderator suggested using the R-help list.) My question is about the chickwts data in the datasets package. According to help(chickwts), the source of the data

[R] classification algorithms with distance matrix

2010-06-07 Thread sidahmed BENABDERRAHMANE
Dear all, I have a problem when using some classification functions (Kmeans, PAM, FANNY...) with a distance matrix, and i would to understand how it proceeds for the positioning of centroids after one execution step. In fact, in the classical formulation of the algorithm, after each step,

[R] how to parse out string separated by special character

2010-06-07 Thread xin wei
hi, everyone: i have a data frame with one single character column as followings: DS_xxx_yyy_24hr_zzz_1 DS_xxx_yyy_24hr_zzz_2 DS_xxx_yyy_24hr_zzz_3 DS_xxx_yyy_24hr_zzz_4 DS_xxx_yyy_24hr_zzz_1 DS_xxx_yyy_24hr_zzz_2 DS_xxx_yyy_24hr_zzz_3 DS_xxx_yyy_24hr_zzz_4 DS_xxx_yyy_24hr_zzz_1 i need to parse

[R] mgcv

2010-06-07 Thread Dipa Hari
Hello Sir, I am using mgcv package for my data. My model is y~x1+f(x2),I want to find out the function f(x2) . Following is the code.   sm1=gam(y~x1+s(x2),family=binomial, f) summary(sm1) plot(sm1,residuals=TRUE, xlab=AGE,pch=20)   In this plot I am getting S(x2,1.93) on y axixs  How

Re: [R] Loading an image/picture (png/jpeg/...) to screen...

2010-06-07 Thread Greg Snow
Once you have your image displayed in a plot, look at the updateusr function in the TeachingDemos package for a way to modify the coordinate system to what you want so that using locator() gives the results that you want. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

[R] Very OT: World Cup Statistics

2010-06-07 Thread Paul
Hello, Sorry for the very Off TOpic post, but I need some data on past football (soccer) world cups. I'd like to find (or calculate) the time to the first goal of each match (where a goal was scored). I''ve looked at the uefa website and can't find what I want, maybe someone here can help

[R] Transforming list to data frame with corresponding columns

2010-06-07 Thread LCOG1
Hi all, Consider the following. a-list(c(MHsub,MHsub,SFD,Duplex)) b-list(c(MHsub,MHsub,SFD)) c-list(c(MHpark,SFD,SFD)) d-list(c(MultiFam,MultiFam,MultiFam,Duplex)) all-list(a,b,c,d) names(all)-c(5,6,7,8) all2-list() for(i in 1:length(all)){ all2[[i]]-table(unlist(all[i])) }

Re: [R] how to parse out string separated by special character

2010-06-07 Thread Henrique Dallazuanna
Try this: gsub(.*_(.*)_.*_.*, \\1, s) On Mon, Jun 7, 2010 at 2:21 PM, xin wei xin...@stat.psu.edu wrote: hi, everyone: i have a data frame with one single character column as followings: DS_xxx_yyy_24hr_zzz_1 DS_xxx_yyy_24hr_zzz_2 DS_xxx_yyy_24hr_zzz_3 DS_xxx_yyy_24hr_zzz_4

Re: [R] Color scale graphic

2010-06-07 Thread Greg Snow
Do you just want a rectangle with different vertical color bands? Then look at the image function. Do you want a small rectangle that goes the length of the x-axis with these color bands, but gives room for another plot above that? Then look at the subplot function (TeachingDemos package)

Re: [R] as.integer

2010-06-07 Thread Erik Iverson
1) Give us a reproducible example. 2) You probably don't want to use attach. 3) Yes there is a way, but without an example, it's hard to say what will work. Assume a data.frame called df, maybe something like the following, which is untested... df[is.factor(df)] - lapply(df[is.factor(df)],

Re: [R] Help with seting up comparison

2010-06-07 Thread Greg Snow
Are you interested in only those 35 animals (not every going to look at any other animals other than those 35, but you want to predict what will happen for those 35)? Or are the 35 animals a sample of a larger population of animals? If the later (seems the most likely case) then you probably

Re: [R] classification algorithms with distance matrix

2010-06-07 Thread Peter Langfelder
On Mon, Jun 7, 2010 at 9:05 AM, sidahmed BENABDERRAHMANE sidahmed.benabderrahm...@loria.fr wrote: Dear all, I have a problem when using some classification functions (Kmeans, PAM, FANNY...)  with a distance matrix, and i would to understand how it proceeds for the positioning of centroids

Re: [R] as.integer

2010-06-07 Thread Greg Snow
Usually when read.table converts numbers to factors it means that there is a problem in the data file, an extra character somewhere. It is best to fix the problem in the source data (or a copy of the source data) so that the data imports properly rather than try to fix it post hoc. If that is

Re: [R] how to parse out string separated by special character

2010-06-07 Thread Greg Snow
Look at the strapply function in the gsubfn package. It may do 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-

Re: [R] Source of chickwts data

2010-06-07 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Chirok Han Sent: Monday, June 07, 2010 9:51 AM To: r-help Subject: [R] Source of chickwts data I'm not sure if this is the right mailing list. My apologies if I'm sending the

Re: [R] mgcv

2010-06-07 Thread Joris Meys
predict(sm1,type=terms,terms=s(x2)) see ?predict.gam Cheers Joris On Mon, Jun 7, 2010 at 7:25 PM, Dipa Hari harid...@yahoo.com wrote: Hello Sir, I am using mgcv package for my data. My model is y~x1+f(x2),I want to find out the function f(x2) . Following is the code.

Re: [R] Transforming list to data frame with corresponding columns

2010-06-07 Thread Henrique Dallazuanna
Try this: `colnames-`(do.call(rbind, lapply(all2, '[', nm - unique(unlist(sapply(all2, names), nm) On Mon, Jun 7, 2010 at 4:20 PM, LCOG1 jr...@lcog.org wrote: Hi all, Consider the following. a-list(c(MHsub,MHsub,SFD,Duplex)) b-list(c(MHsub,MHsub,SFD)) c-list(c(MHpark,SFD,SFD))

Re: [R] paste together a string object later to be utilized in a function

2010-06-07 Thread moleps
Sorry for bothering all of you. In the end it turned out to be much simpler than I thought. Takes a while to get used to the vectorizing idea. require(survival) require(ggplot2) ggkm-function(time,event,stratum) { stratum-as.factor(stratum)

Re: [R] Very OT: World Cup Statistics

2010-06-07 Thread Albyn Jones
Paul The FIFA database doesn't have times that goals are scored either. The best I have found is at http://www.worldcup-history.com/, but you have to check individual match reports for the times that goals are scored. albyn On Mon, Jun 07, 2010 at 09:50:34PM +0100, Paul wrote: Hello, Sorry

[R] Borders on a polygon

2010-06-07 Thread beloitstudent
Hi, I am trying to do some shading in R and am using the polygon() setting. I want the border on the top and bottom of the polygon, but not on the left and right. Is there a way to do this in R? Thanks in advance! beloitstudent -- View this message in context:

Re: [R] Very OT: World Cup Statistics

2010-06-07 Thread Daniel Malter
these websites seem to have the data. though I have not checked for completeness. the rsssf in particular is seems to be concerned with collecting and archiving these kinds of football data: http://www.rsssf.com/tablesw/worldcup.html http://wapedia.mobi/en/1930_FIFA_World_Cup_Group_1 hope that

Re: [R] Source of chickwts data

2010-06-07 Thread Chirok Han
Many thanks. That's the right one. It would be better corrected in the next version of R. Thanks again. Chirok On Tue, Jun 8, 2010 at 6:01 AM, William Dunlap wdun...@tibco.com wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf

Re: [R] Transforming list to data frame with corresponding columns

2010-06-07 Thread LCOG1
Henrique, The last message gave me exactly what i needed. Im still not sure whats going on, i will need to reference the do.call function some more. Thanks for your help. Josh Roll Lane Council of Governments Transportation Planner Office: 541-682-2454 Cell: 406-671-5069 jr...@lcog.org

[R] Desolve package: How to pass thousand of parameters to C compiled code?

2010-06-07 Thread cmmu_mile
Hi, I have used DeSolve package for my ODE problem regarding infectious disease transmission and currently am trying to pass lots (roughly a thousand) of model parameters to the C compiled model (I have to use C compiled code instead of R code purely because of the speed). I can't go define

Re: [R] Borders on a polygon

2010-06-07 Thread Sean Anderson
On Mon, Jun 7, 2010 at 6:55 PM, beloitstudent wrote: [...] I am trying to do some shading in R and am using the polygon() setting. I want the border on the top and bottom of the polygon, but not on the left and right. [...] One way would be to add the borders after as lines. For example:

Re: [R] barchart but with boxes

2010-06-07 Thread Daisy Englert Duursma
Thanks to all, I did eventually come up with a solution which involved sub-setting the data first into categories, making an empty plot, and then plotting rectangles. I really like the ggplot2 and I will use that next time. My ugly script is below Thanks, Daisy plot(1,

[R] color of histgram in Psych package (pairs.panels)

2010-06-07 Thread elaine kuo
Hello, I searched the archives but found no answers. How to modify the hisgram color of function pairs.panels of Psych package ? I tried col() but it was the line color modified. Thanks. Elaine [[alternative HTML version deleted]] __

Re: [R] Ignoring missing elements in data.frame()

2010-06-07 Thread Scott Chamberlain
Hi Joris, Thanks very much. I think the %in% ls() was the key. I just needed to know how to select elements that existed in ls(). Scott On Sat, Jun 5, 2010 at 4:22 PM, Joris Meys jorism...@gmail.com wrote: Hi, One possible way to get around it is using following idea : X1 - rnorm(10) X2

[R] Matrix to database -- best practices/efficiency?

2010-06-07 Thread Jonathan Greenberg
I have a matrix of, say, M and N dimensions: my_matrix=matrix(c(1:60),nrow=6,ncol=10) I have two id vectors corresponding to the rows and columns, e.g.: id_m=seq(10,60,by=10) id_n=seq(100,1000,by=100) I would like to create a proper database (let's say a data.frame for this example -- i'm

[R] R statistical program 2.10.0

2010-06-07 Thread Datta, Ronjon
Hi, I just need to know where the R was developed, for a journal article citation. Thanks Ronjon [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Filtering out a data.frame

2010-06-07 Thread Jeff08
Sample Data.Frame format Name is Returns.nodup X id ticker date_ adjClose totret RankStk 427225 427225 00174410AHS 2001-11-1321.661001235 id uniquely defines a row What I am trying to do is filter out id's that have less than 1500 data points (by date)

[R] About lm.ridge in the MASS package

2010-06-07 Thread baghaliforo...@yahoo.com
Hi, I had a questions about doing ridge regression in R. Why is it that when I try this on datasets with more predictors than samples (pn) using lambda=0, it still finds coefficients for all predictors? I thought when lambda=0, it should be like ordinary regression and therefore not find

[R] Adding in Missing Data

2010-06-07 Thread Jeff08
Sample Data.Frame format Name is Returns.names X id ticker date_ adjClose totret RankStk 427225 427225 00174410AHS 2001-11-1321.661001235 id uniquely defines a row What I am trying to do is add missing data for each ID. Important Information: Date is

Re: [R] R statistical program 2.10.0

2010-06-07 Thread Erik Iverson
Datta, Ronjon wrote: Hi, I just need to know where the R was developed, for a journal article citation. There's a function for that! citation() __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Filtering out a data.frame

2010-06-07 Thread Erik Iverson
Jeff08 wrote: Sample Data.Frame format Name is Returns.nodup X id ticker date_ adjClose totret RankStk 427225 427225 00174410AHS 2001-11-1321.661001235 id uniquely defines a row What I am trying to do is filter out id's that have less than 1500 data

Re: [R] R statistical program 2.10.0

2010-06-07 Thread Jorge Ivan Velez
Hi Ronjon, From citation(): citation() To cite R in publications use: R Development Core Team (2010). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org. A BibTeX entry for

Re: [R] Matrix to database -- best practices/efficiency?

2010-06-07 Thread Gabor Grothendieck
Try this: mm - matrix(1:6, 3, dimnames = list(LETTERS[1:3], letters[1:2])) mm a b A 1 4 B 2 5 C 3 6 library(reshape) melt(mm) X1 X2 value 1 A a 1 2 B a 2 3 C a 3 4 A b 4 5 B b 5 6 C b 6 On Mon, Jun 7, 2010 at 10:33 PM, Jonathan Greenberg

Re: [R] Adding in Missing Data

2010-06-07 Thread Erik Iverson
Jeff08 wrote: Sample Data.Frame format Name is Returns.names X id ticker date_ adjClose totret RankStk 427225 427225 00174410AHS 2001-11-1321.661001235 id uniquely defines a row What I am trying to do is add missing data for each ID. Important

Re: [R] Matrix to database -- best practices/efficiency?

2010-06-07 Thread Jorge Ivan Velez
Hi Jonathan, Following Gabor Grothendieck's advice, try also: mm - matrix(1:6, 3, dimnames = list(LETTERS[1:3], letters[1:2])) as.data.frame.table(mm) HTH, Jorge On Mon, Jun 7, 2010 at 10:33 PM, Jonathan Greenberg wrote: I have a matrix of, say, M and N dimensions:

Re: [R] Matrix to database -- best practices/efficiency?

2010-06-07 Thread Bill.Venables
I think what you are groping for is something like this my_matrix - matrix(1:60, nrow = 6) id_a - seq(10,60,by=10) id_b - seq(100,1000,by=100) my_database - cbind( expand.grid(id_a = id_a, id_b = id_b), mat = as.vector(my_matrix) ) -Original Message- From:

Re: [R] Help with seting up comparison

2010-06-07 Thread Bart Joosen
Greg, the animals are a sample of a larger population, as you guessed. I used lmer to estimate the effects: lmer(Count~Animal | Day, dat) Linear mixed model fit by REML Formula: Count ~ Animal | Day Data: dat AIC BIC logLik deviance REMLdev 1554 1574 -772 15421544 Random