Re: [R] Simple parallel for loop

2012-05-15 Thread R. Michael Weylandt
Take a look at foreach() and %dopar$ from the CRAN package foreach. Michael On Tue, May 15, 2012 at 1:57 AM, Alaios ala...@yahoo.com wrote: Dear all, I am having a for loop that iterates a given number of measurements that I would like to split over 16 available cores. The code is in the

Re: [R] How to Un-group a grouped data set?

2012-05-15 Thread Cheenghee AM Koh
Thank you so much! I can't believe I spent the whole night by not knowing this one command do.call This is so handy! Best, Koh On Tue, May 15, 2012 at 12:52 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: Sorry -- I missed the bit about the AE in your original post. Perhaps you

Re: [R] How to Un-group a grouped data set?

2012-05-15 Thread R. Michael Weylandt
It is a nifty and surprisingly useful construct whenever you need to construct a function call programmatically or apply it to a list. R-News 2/2 has some useful tips on this and related functions in the Programmer's Note section if you're interested. Best, Michael On Tue, May 15, 2012 at 2:05

Re: [R] Simple parallel for loop

2012-05-15 Thread Alaios
Hello Michael, thanks for the answer, it looks like that the foreach package might do what I want. Few comments though The foreach loop asks for a way to combine results, which I do not want to have any. AFter I load a dataset the subsequent function does plotting and save the files as pdfs,

Re: [R] Simple parallel for loop

2012-05-15 Thread R. Michael Weylandt
I haven't actually used foreach very much myself, but I would imagine that you could just take advantage of the fact that most plot functions return their arguments silently and then just throw the results away (i.e., don't assign them) Switching %do% to %dopar% automatically activates

Re: [R] Simple parallel for loop

2012-05-15 Thread Alaios
Thanks Michael, last comment that I am trying to figure out, is that my called function has two inputs arguments, while foreach looks to be working with only on one, being also able to execute one command while I need two. ReadDataSet (based on iteration number). Call PlotFunction(based on two

Re: [R] Simple parallel for loop

2012-05-15 Thread R. Michael Weylandt
Perhaps mcmapply from the parallel package? It's a parallel mapply to complement mclapply. Michael On Tue, May 15, 2012 at 2:28 AM, Alaios ala...@yahoo.com wrote: Thanks Michael, last comment that I am trying to figure out, is that my called function has two inputs arguments, while foreach

[R] Alternative to heat.color(x)

2012-05-15 Thread Gundala Viswanath
The colors generated by heat.color(x) is too saturated. Where is there alternative command similar to that but non-heated' which also I can input the value 'x'. - G.V. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Interpreting Q-Q Plots

2012-05-15 Thread Keith Jewell
On 14/05/2012 23:21, Rich Shepard wrote: On Tue, 15 May 2012, Peter Alspach wrote: Probably highly skewed to the right, with discrete values (perhaps due to the limitations in the accuracy of the assessment equipment). Peter, Most of these data are near zero or the lower detection limit.

Re: [R] Alternative to heat.color(x)

2012-05-15 Thread Duncan Murdoch
On 12-05-15 4:00 AM, Gundala Viswanath wrote: The colors generated by heat.color(x) is too saturated. Where is there alternative command similar to that but non-heated' which also I can input the value 'x'. colorRamp() is very flexible. Duncan Murdoch

[R] Probabilistic aggregation

2012-05-15 Thread davewiz
Hello, I'm a new user to R and need some help coding a mathmatically simple aggregation of normal distributions. I have three normal distributions: A ~ N(8.51, 4.24^2) B ~ N(7.57, 3.62^2) C ~ N(10.84, 6.59^2) with correlation coefficients of: rho(AB) = 0.710 rho(AC) = 0.263 rho(BC) = 0.503 and I

Re: [R] Alternative to heat.color(x)

2012-05-15 Thread Achim Zeileis
On Tue, 15 May 2012, Duncan Murdoch wrote: On 12-05-15 4:00 AM, Gundala Viswanath wrote: The colors generated by heat.color(x) is too saturated. Where is there alternative command similar to that but non-heated' which also I can input the value 'x'. colorRamp() is very flexible.

[R] Renaming names in R matrix

2012-05-15 Thread Gundala Viswanath
I have the following matrix: dat [,1] [,2] [,3][,4] foo 0.7574657 0.2104075 0.02922241 0.002705617 foo 0.000 0.000 0. 0.0 foo 0.000 0.000 0. 0.0 foo 0.000 0.000 0. 0.0 foo 0.000

Re: [R] Renaming names in R matrix

2012-05-15 Thread Jessica Streicher
example: x-c(1,1,1) y-c(2,2,2) m-rbind(x,y) m [,1] [,2] [,3] x111 y222 dimnames(m) [[1]] [1] x y [[2]] NULL dimnames(m)[[1]]-c(a,b) m [,1] [,2] [,3] a111 b222 Am 15.05.2012 um 11:19 schrieb Gundala Viswanath: I have the following

Re: [R] Inf and lazy evaluation

2012-05-15 Thread Stefan Evert
Oh, what is this world coming to when you can't count on laziness to be lazy. ;) I should probably stop reading about Haskell and their lazy way of doing things. Haskell would still have to check an infinite number of potential files on your hard disk, because it can't now when it's seen

Re: [R] Renaming names in R matrix

2012-05-15 Thread Paolo Agnolucci
Hello, A = matrix(0, 3,3) rownames(A) = c(A, B, C) A [,1] [,2] [,3] A000 B000 C000 HTH, Thanks, Paolo On 15 May 2012 10:19, Gundala Viswanath gunda...@gmail.com wrote: I have the following matrix: dat [,1] [,2]

Re: [R] Scraping a web page.

2012-05-15 Thread Keith Weintraub
Thanks, That was very helpful. I am using readLines and grep. If grep isn't powerful enough I might end up using the XML package but I hope that won't be necessary. Thanks again, KW -- On May 14, 2012, at 7:18 PM, J Toll wrote: On Mon, May 14, 2012 at 4:17 PM, Keith Weintraub

Re: [R] Scraping a web page.

2012-05-15 Thread Gabor Grothendieck
On Tue, May 15, 2012 at 7:06 AM, Keith Weintraub kw1...@gmail.com wrote: Thanks,  That was very helpful. I am using readLines and grep. If grep isn't powerful enough I might end up using the XML package but I hope that won't be necessary. This only uses readLines and strapplyc (from

Re: [R] How to interpret an ANOVA result?

2012-05-15 Thread Bryan Hanson
I see that no one has replied on this, so I'll take a stab. This is probably a matter of personal taste, but I would suggest a somewhat different and simpler approach. What you have done is not strictly an ANOVA, it's a linear model (they are related). But the particular way you've asked R

Re: [R] Calculating all possible ratios

2012-05-15 Thread Rui Barradas
Hello, If it's just a correlation matrix, see ?cor Note that it computes the correlations between columns, the variables; rows are observation. So you'll need to transpose the matrices or data.frames in order to have probesets as variables. You'll also need to have matrices of the same

Re: [R] Probabilistic aggregation

2012-05-15 Thread Petr Savicky
On Mon, May 14, 2012 at 11:15:18PM -0700, davewiz wrote: Hello, I'm a new user to R and need some help coding a mathmatically simple aggregation of normal distributions. I have three normal distributions: A ~ N(8.51, 4.24^2) B ~ N(7.57, 3.62^2) C ~ N(10.84, 6.59^2) with correlation

Re: [R] How to apply a function to a multidimensional array, based on its indices

2012-05-15 Thread Rui Barradas
Hello, Your way is much better than to mess with the dim attribute, like I did. But, If you can create a data.frame or matrix that has the indices Actually, it must be a matrix, indices can't be of type list. A way to avoid loops/apply altogether, and much faster, is the one creating K3

Re: [R] Inf and lazy evaluation

2012-05-15 Thread peter dalgaard
On May 15, 2012, at 07:25 , R. Michael Weylandt wrote: The only place I know lazy evaluation really is visible and widely used is in the passing of function arguments. It's what allows magic like zz - 1:5 plot(zz) to know your variable was called zz. This is actually *not* lazy

[R] Error in eval(expr, envir, enclos) : object 'Rayos' not found???

2012-05-15 Thread Jhope
Hi R-listers, I am trying to make a trellis boxplot with the HSuccess (y-axis) in each Rayos (beach sections) (x-axis), for each Aeventexhumed (A, B, C) - nesting event. I am not able to do so and keep receiving: Error in eval(expr, envir, enclos) : object 'Rayos' not found Please advise,

[R] caret: Error when using rpart and CV != LOOCV

2012-05-15 Thread Dominik Bruhn
Hy, I got the following problem when trying to build a rpart model and using everything but LOOCV. Originally, I wanted to used k-fold partitioning, but every partitioning except LOOCV throws the following warning: Warning message: In nominalTrainWorkflow(dat = trainData, info = trainInfo,

Re: [R] Error on easy way for JoSAE Package

2012-05-15 Thread ana24maria
Here you got the data sets (which are also available in the txt attachment): head(amigo) siruta med migr y_m y_f ydirect mediu_um mediu_rm mediu_uf mediu_rf 1 1 1017 13 3 0 301 301000 2 1 1071 30 0 0 000

[R] KEGGSOAP installation error

2012-05-15 Thread TEOMB84
Hello, I'm trying to install KEGGSOAP with bioconductor but i'm facing this problem: / biocLite(KEGGSOAP) BioC_mirror: http://bioconductor.org Using R version 2.15, BiocInstaller version 1.4.4. Installing package(s) 'KEGGSOAP' trying URL

[R] Indexing in summaryBy

2012-05-15 Thread Julian Wucherpfennig
I'm trying to use a self-written function with the summaryBy function (doBy package). I have lots of data from Monte Carlo experiments comparing different estimators across different (combinations of) parameter values, similar to the following form: colnames(mydata) - c(X, b0, b1, # parameter

[R] Correlation Matrix Kendall Tau-b with P value

2012-05-15 Thread Nick Duncan
Dear All, I have been trying to find some code to enable this matrix to be generated, but don't seem to find one in which the tau-b and p values are inserted into the matrix. I have found a number that seem to require two matrices, which is a bit clumsy. Any guidance much appreciated. Best, Nick

[R] Transfering data from R list to other document format

2012-05-15 Thread pannigh
Dear users, I want to transfer a list of results from R to some practical format, from where I can continue manipulating, copying,... the values, e.g. : list1 - list(My first list, matrix(1:6, ncol=3), c(1,2,3,4,5,6) ) # Imagining I forgot something and want to add it to the list like: list1[[4]]

[R] how to find outliers from the list of values

2012-05-15 Thread Prakash Thomas
Hi, I am new to R and I would like to get your help in finding 'outliers'. I have mvoutlier package installed in my system and added the package . But I not able find a function from 'mvoutlier' package which will identify 'outliers'. This is the sample list of data I have got which has

[R] Problem with legend and RasterLayer

2012-05-15 Thread julio cesar oliveira
Dear, I can't plot legend over a Rasterlayer. My system is MAC OS Lion. See my problem: ### Data img class : RasterLayer dimensions : 5, 5, 25 (nrow, ncol, ncell) resolution : 0.002245, 0.002245 (x, y) extent : -48.33875, -48.32753, -20.35756, -20.34634 (xmin, xmax,

[R] help

2012-05-15 Thread Eva-Lotta Blom
1. Emma is performing an experiment that requires individual handling of some animals. The sizes of the animals are lognormally distributed: The natural logarithms of their sizes has a normal distribution with mean 3 and standard deviation 0.4. The time (in minutes) it takes to handle each

[R] counts on bars on barplot

2012-05-15 Thread arkanion
How can I have the corresponding counts shown on each bar? -- View this message in context: http://r.789695.n4.nabble.com/counts-on-bars-on-barplot-tp4630060.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] Error when CFA with lavaan is applied

2012-05-15 Thread manuelhusagre
Dear all, I am trying to do a multiple groups CFA in lavaan and I get the following message: ERROR: 'x' is empty My CFA model has 5 factors, 66 variables and a subset data of 231 cases. The model is cleaned of 0 variance variables. There's no error in the syntaxis like missing + or errors in

[R] Non-parametric (M)ANOVA with R ?

2012-05-15 Thread Panagiotis Varsamis
Dear R-team, As an extension of my previous work ( http://www.ncbi.nlm.nih.gov/pubmed/21377324) I am now about to handle new obtained ordinal data. Disabled students had to rank their top 5 incentives for participating in sport activities according to their personal (subjective) importance.

Re: [R] How to apply a function to a multidimensional array based on its indices

2012-05-15 Thread math_daddy
Thanks for the help, this worked great! Much appreciated. -- View this message in context: http://r.789695.n4.nabble.com/How-to-apply-a-function-to-a-multidimensional-array-based-on-its-indices-tp4629940p4630068.html Sent from the R help mailing list archive at Nabble.com.

[R] Interpretation Results Netlogit sna package

2012-05-15 Thread Claudia Kasper
Hello, I ran the netlogic command (in sna package; GLM with logit link for binomial data and QAP as the null hypothesis) and I am not absolutely sure about how to interpret the output. For the coefficients, I get this table: Coefficients: Estimate Exp(b) Pr(=b)

[R] reading data into R

2012-05-15 Thread jacaranda tree
Hi I am really new using R, so this is really a beginner stuff! I created a very small data set on excel and then converted it to .csv file. I am able to open the data on R using the command read.table (mydata1.csv, sep=,, header=T) and it just works fine. But when I want to work on the data

[R] Ordinal Logistic regression

2012-05-15 Thread Barbour, Russell
Dear All, I am new to ordinal logistic regression. Using ordinal regression within the R Commander GUI, I have generated an independent variable that is significant, but whose 95% confidence intervals slightly crosses 1. Is this possible? Here is the syntax and output: polr(formula =

[R] tidbit about R-core member

2012-05-15 Thread Mark Leeds
Hi: I just wanted to let the R-community know that Thomas Lumley was elected Fellow of the American Stastistical Association. Congratulations Thomas. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] reading data into R

2012-05-15 Thread Rui Barradas
hello, The error message is right, you have read the file have NOT assigned it to an object, to a variable. mydata1 - read.table (mydata1.csv, sep=,, header=T) Now you can use the variable 'mydata1'. It's a data.frame, and you can see what it looks like with the following instructions.

Re: [R] Error on easy way for JoSAE Package

2012-05-15 Thread John Kane
Please supply data using dput() John Kane Kingston ON Canada -Original Message- From: ana24ma...@gmail.com Sent: Tue, 15 May 2012 03:10:45 -0700 (PDT) To: r-help@r-project.org Subject: Re: [R] Error on easy way for JoSAE Package Here you got the data sets (which are also

Re: [R] reading data into R

2012-05-15 Thread R. Michael Weylandt
You need to assign your data set to something -- right now you're just reading it in and then throwing it away: dats - read.csv(mydata1.csv) mean(dats$X) # Dollar sign, not ampersand Best, Michael On Tue, May 15, 2012 at 8:57 AM, jacaranda tree myjacara...@yahoo.com wrote: Hi I am really new

Re: [R] KEGGSOAP installation error

2012-05-15 Thread Martin Morgan
On 05/15/2012 03:29 AM, TEOMB84 wrote: Hello, I'm trying to install KEGGSOAP with bioconductor but i'm facing this problem: / biocLite(KEGGSOAP) Hi -- ask questions about Bioconductor packages on the Bioconductor mailing list. http://bioconductor.org/help/mailing-list/ This looks like

Re: [R] reading data into R

2012-05-15 Thread John Kane
What was the exact syntax? read.table (mydata1.csv, sep=,, header=T) will read the data but not save anything. mydat -read.table (mydata1.csv, sep=,, header=T) give you a data.frame called mydat. mean(mydat$X) should give you the mean of X John Kane Kingston ON Canada -Original

Re: [R] Transfering data from R list to other document format

2012-05-15 Thread Jeff Newmiller
Well, dput() can do this, but if your goal is exchange with other analysis packages then you need to decide whether transforming to XML or to a tabular form meets your needs better. For the latter, you might consider the ldply function from the plyr package. You may benefit from reading the

Re: [R] reading data into R

2012-05-15 Thread Ivan Calandra
Hi ! You need to assign the output of read.table() into an object; this is how R works: mydata - read.table (mydata1.csv, sep=,, header=T) mymean - mean(mydata$var) You should read some introductory material. I found this useful: http://www.burns-stat.com/pages/Tutor/hints_R_begin.html And

Re: [R] counts on bars on barplot

2012-05-15 Thread John Kane
A bit more information might help. How are you ploting the barplot? Where do you want the counts. etc. If you are using the basic graphics barplot have a look at ?text John Kane Kingston ON Canada -Original Message- From: bou...@gmail.com Sent: Tue, 15 May 2012 04:43:34 -0700

[R] How to interpret an ANOVA result?

2012-05-15 Thread Rui Barradas
Hello, 1. There's a function anova(), which you have forgot to use. model - lm(d~pos*site, data=x) anova(model) Analysis of Variance Table Response: d Df Sum Sq Mean Sq F value Pr(F) pos1 0.05 0.050 0.0026 0.960045 site 4 636.50 159.125 8.3971 0.003084 **

[R] missing observations

2012-05-15 Thread Mintewab Bezabih
Dear R users, I have missing observations in my data that I remove in my analysis. I am able to run my codes alright but I want the non missing values to be correctly identified and therefore want to tag my id vector along in my results. Since the vector of ids has no role in the analysis, I

Re: [R] Error in eval(expr, envir, enclos) : object 'Rayos' not found???

2012-05-15 Thread David Winsemius
On May 15, 2012, at 5:58 AM, Jhope wrote: Hi R-listers, I am trying to make a trellis boxplot with the HSuccess (y-axis) in each Rayos (beach sections) (x-axis), for each Aeventexhumed (A, B, C) - nesting event. I am not able to do so and keep receiving: Error in eval(expr, envir,

Re: [R] help

2012-05-15 Thread Sarah Goslee
Hi, R-help is not a homework help list. If you're having trouble, you need to speak with your instructor instead. Best of luck, Sarah On Tue, May 15, 2012 at 8:04 AM, Eva-Lotta Blom eva-lotta.b...@bioenv.gu.se wrote:  1.  Emma is performing an experiment that requires individual handling of

Re: [R] help

2012-05-15 Thread David Winsemius
Cutting and pasting your entire homework problem verbatim into an rhelp posting and assigning it an uninformative subject line and then expecting a useful response is very hopeful on your part, but those hopes are unlikely to be realized. You might spend some time reading the Posting

Re: [R] help

2012-05-15 Thread Jeff Newmiller
Please read the Posting Guide mentioned at the bottom of every message on this list. There is a no homework policy. Please refer to your assistance options available through your educational institution. --- Jeff Newmiller

Re: [R] help

2012-05-15 Thread Sarah Goslee
Lotta, If this isn't homework, then you need to read the posting guide (see link at bottom of each posting to the list), and ask a more specific question than can't get any further. What have you tried? What didn't work? Where did it go wrong? What book are you working from? Etc. Even if not an

Re: [R] help

2012-05-15 Thread Sarah Goslee
Good plan. Also, please notice that you need to hit reply all to send your messages to the list and not just to me. Sarah On Tue, May 15, 2012 at 10:34 AM, Eva-Lotta Blom eva-lotta.b...@bioenv.gu.se wrote: yes i should have done that, sorry for this i was just very frustrated and could not

Re: [R] How to Un-group a grouped data set?

2012-05-15 Thread David L Carlson
newdats - rbind(cbind(dats[rep(1:nrow(dats), dats$AEs), 1:2], AEs=1), cbind(dats[rep(1:nrow(dats), dats$N-dats$AEs),1:2], AEs=0)) But the data will not be in the order you specified unless you add newdats - newdats[order(newdats$Study, -newdats$TX, -newdats$AEs),] and you may want to

Re: [R] Transfering data from R list to other document format

2012-05-15 Thread David Winsemius
On May 15, 2012, at 6:56 AM, pannigh wrote: Dear users, I want to transfer a list of results from R to some practical format, from where I can continue manipulating, copying,... the values, e.g. : list1 - list(My first list, matrix(1:6, ncol=3), c(1,2,3,4,5,6) ) # Imagining I forgot

Re: [R] Probabilistic aggregation

2012-05-15 Thread David L Carlson
To generate multivariate normal distributions, you will want mvrnorm in package MASS. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Petr Savicky Sent: Tuesday, May 15, 2012 7:14 AM To: r-help@r-project.org Subject: Re: [R]

Re: [R] plot: many bars with wide bars

2012-05-15 Thread Marion Wenty
Hi Jim, thank you very much for your answer! I solved the problem in another way now, though, because I think with this function from the package plotrix I would have had to change my whole function (and all the other similar ones I had written). As far as I understand it up till now, there are

[R] max value

2012-05-15 Thread Melissa Rosenkranz
Here is an R problem I am struggling with: My dataset is organized like this... subject sessionvariable_x variable_y 01 11interger values 01 12 01 13 01

Re: [R] barplot: legend: two rows

2012-05-15 Thread Marion Wenty
Hello, I solved my problem with the uneven numbers of legend elements, which should be put into more than one rows, in the following way: I added another legend element which is empty () and is filled with white:

Re: [R] Discrete choice model maximum likelihood estimation

2012-05-15 Thread John C Nash
Your function will not evaluate as coded. i.e., llfn(start.par) doesn't work, as there are unequal numbers of arguments. Also, while R allows you to use variables that are not explicitly defined for a function, I've almost always got into trouble if I don't pass them VERY carefully. Finally,

Re: [R] counts on bars on barplot

2012-05-15 Thread pannigh
If you use simple barplot graphic try this, e.g.: a-barplot(some.data) text(a, some.data, some.data) The text command needs x and y coordinates, by assigning your barplot to a (here), you have the x coordinats and by using the y-values of the barplot, the values will be written ontop of the

[R] vuong/clarke tests for relogit

2012-05-15 Thread Daniel McDowell
Does anyone know a package that will conduct Vuong and Clarke tests to compare non-nested rare-events logit (relogit) models via Zelig? I know the pscl package can conduct a Vuong test, however, it doesn't seem to work with relogit. I haven't been able to find a package that can implement the

Re: [R] Transfering data from R list to other document format

2012-05-15 Thread pannigh
Thanx for your effort answering by phone! dput (list, list.txt) does write something to a text doc but in a confusing manner. All previous commands that created the list seem to appear. However, I will check out the pack you mentioned. Guess my aim would be to read the list into a simple .txt

[R] Trouble with LAPACK / SHLIB

2012-05-15 Thread Garbett, Shawn P
I'm creating my own shared lib that depends on LAPACK. It works fine on my mac (R version 2.15.0). It is compiled as such: R CMD SHLIB estfit.c It's loaded in R with dyn.load(estfit.so) When doing this on Kubuntu (with r-base and r-base-dev, version 2.15.0 of R), it results in:

[R] rpart - predict terminal nodes for new observations

2012-05-15 Thread tudor
Dear useRs: Is there a way I could predict the terminal node associated with a new data entry in an rpart environment? In the example below, if I had a new data entry with an AM of 5, I would like to link it to the terminal node 2. My searches led to

[R] R

2012-05-15 Thread Eva-Lotta Blom
To all moderators i guess, my question was probably not clear this is not a homework, i am trying to understand R by doing some exercise in my book. I will however participate a course in R in august and thought it could be good to have some knowledge before. I hoped for help from you since i

Re: [R] Transfering data from R list to other document format

2012-05-15 Thread pannigh
Yup, “rapply“ does the magic. Thank you very much, this command is new to me! My “glaringly obvious error” is indeed very obvious and was a result of constructing an example here and copying my “lapply” command into the text. So don't worry, when the question arose both names were identical Once

[R] help

2012-05-15 Thread 杨秀芬
To whom this may concern, I have been learing R software. Recently when I did the analysis of the associaiton of SNPs and disease, I have met one problem with Bonferroni correction. Is there a package I should download? What is the command I should use? I have been learning it for a long time

Re: [R] counts on bars on barplot

2012-05-15 Thread arkanion
I want to label each bar with the values of each bar (counts) on top of each of them. -- View this message in context: http://r.789695.n4.nabble.com/counts-on-bars-on-barplot-tp4630060p4630107.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] counts on bars on barplot

2012-05-15 Thread arkanion
got it, did it, worked ! thanks a lot ! -- View this message in context: http://r.789695.n4.nabble.com/counts-on-bars-on-barplot-tp4630060p4630114.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Data read as labels

2012-05-15 Thread barb
Hey David, i tried all this - it doesn´t work :( file-read.csv2(tmp,sep=;,skip=5) # or file-read.csv2(tmp,sep=;,skip=5,stringsAsFactors=FALSE)a-(relevant-file[,2]) clean - as.numeric(levels(a))[as.integer(a)] clean-as.numeric(as.character(a)) i often use noquote and strsplit and then convert

[R] Master data frame or so

2012-05-15 Thread I.R. Holtman
Dear sir/madam, I have been using R for a while now for microarray analysis, and I would like to make a master data frame in which I can combine information from many different sources. The basic list a genelist with 25.000 probes, then I would like to have a subcompartment with the statistical

[R] Odd behaviour of identical()

2012-05-15 Thread math_daddy
Consider the following code: test - function(n) { for(x in 1:n) { for(y in 1:n) { for(r in max(x-1,1):min(x+1,n)) { for(s in max(y-1,1):min(y+1,n)) { vec - c(x-r,y-s) print(c(vec = , vec)) print(identical(vec,c(0,0))) }

Re: [R] How to sum and group data by DATE in data frame

2012-05-15 Thread Cren
Hello, I have a time series with intraday datas, sampled every 30'; I would need to aggregate them in this way: summing up all datas within a day. I tried to use *aggregate(...)* function to get my goal, but it aggregates in wrong way (I did not understand how so far); what I need is like

Re: [R] R

2012-05-15 Thread Bert Gunter
There are many good R tutorials on the Web, including An Introduction to R, which comes with R. IMHO, that's where you should start, not in doing statistics texts exercises. CRAN also maintains a list of R texts, some on statistics, some not. -- Bert On Tue, May 15, 2012 at 7:17 AM, Eva-Lotta

Re: [R] R

2012-05-15 Thread R. Michael Weylandt
If that's your aim, I might suggest you start with a text that is aimed at teaching R specifically and should help you work up to the level of questions you posted earlier: http://cran.r-project.org/ and then the Contributed link in the bottom left gives you a wide variety of options to start from

Re: [R] How to sum and group data by DATE in data frame

2012-05-15 Thread R. Michael Weylandt
How are you using aggregate()? It seems to sum for me... z - zoo(1:50, seq.POSIXt(from = Sys.time(), by = 30 min, length.out = 50)) aggregate(z, as.Date(time(z)), sum) Best, Michael On Tue, May 15, 2012 at 11:52 AM, Cren oscar.soppe...@bancaakros.it wrote: Hello, I have a time series with

Re: [R] Odd behaviour of identical()

2012-05-15 Thread R. Michael Weylandt
I believe it's coming down to the difference between integers and doubles (the computer data types, not the math-y meaning of those terms) -- e.g., identical( c(0L, 0L), c(0,0) ) Note that sequences made by `:` provide integers when possible: is.integer(1:5) You may want to use all.equal()

[R] lmekin bug

2012-05-15 Thread Terry Therneau
Version 2.2-3 of the coxme package has been posted to CRAN. It should propogate to the mirrors over the next 1-2 days. Version 2.2-2 had a serious bug in the lmekin function. If the variance matrix of the random effects was not diagonal the answers were wrong: at one spot an upper triangular

Re: [R] max value

2012-05-15 Thread Peter Ehlers
On 2012-05-15 08:36, Melissa Rosenkranz wrote: Here is an R problem I am struggling with: My dataset is organized like this... subject sessionvariable_x variable_y 01 11interger values 01 12 01

[R] Change One Column Name in Data Frame

2012-05-15 Thread Rich Shepard
The data frame has 61 columns and one column name needs to be changed. The colnames() function can be used to change all of them when passed a vector of names, but can it also change a single name? If not, is there a way to change just the one column name? Rich

Re: [R] labels in hist and ranges of an axis

2012-05-15 Thread Peter Ehlers
I'm a bit late to this party, but why not just plot with labels=FALSE and add the labels with text(x,y,labels,cex)? The values of x are given by the h$mids in the h - hist() object and the values of y are essentially h$counts (add a bit to move the labels up). Might need to set ylim to

Re: [R] Change One Column Name in Data Frame

2012-05-15 Thread R. Michael Weylandt
x - data.frame(a = 1:5, b = rnorm(5)) colnames(x) colnames(x)[2] - Cow x HTH, Michael On Tue, May 15, 2012 at 12:30 PM, Rich Shepard rshep...@appl-ecosys.com wrote:  The data frame has 61 columns and one column name needs to be changed. The colnames() function can be used to change all of

[R] standartized residuals in garchFit function

2012-05-15 Thread justina
Hello, I would be very grateful if someone answers my question. I am using garchFit function to model my data, and by summary of the model are given characteristics of standartized residuals. But to get I can only simple residuals (with model@residuals). How to get the standartized residuals or

Re: [R] How to sum and group data by DATE in data frame

2012-05-15 Thread Cren
Thank you for your help, Michael. I used *aggregate(x, by = timeSequence(by = day), FUN = sum)* but the results is very different from *sum(x[1:13])*, where 13 is the number of daily observations I've sampled. Michael Weylandt wrote How are you using aggregate()? It seems to sum for me...

[R] pass objects into ... (dot dot dot)

2012-05-15 Thread Ben quant
Hello, Thanks in advance for any help! How do I pass an unknown number of objects into the ... (dot dot dot) parameter? Put another way, is there some standard way to pass multiple objects into ... to fool the function into thinking the objects are passed in separately/explicitly with common

Re: [R] How to sum and group data by DATE in data frame

2012-05-15 Thread R. Michael Weylandt
Can you provide a reproducible example? use dput() to send your data in a reproducible and user-friendly format. (It might not look user friendly, but trust me, it is) If x is really long, perhaps just dput(head(x, 25)) will suffice. Just a guess as to your problem: I'm not familiar with the

Re: [R] pass objects into ... (dot dot dot)

2012-05-15 Thread Steve Lianoglou
Hi, On Tue, May 15, 2012 at 12:46 PM, Ben quant ccqu...@gmail.com wrote: Hello, Thanks in advance for any help! How do I pass an unknown number of objects into the ... (dot dot dot) parameter? Put another way, is there some standard way to pass multiple objects into ... to fool the

Re: [R] Change One Column Name in Data Frame

2012-05-15 Thread Rich Shepard
On Tue, 15 May 2012, R. Michael Weylandt wrote: colnames(x)[2] - Cow Michael, Thank you. Rich __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] save to Rdata file and to txt

2012-05-15 Thread Alaios
Dear all, I am using the save(moransI,file=saveString) to save a variable called moransI to a file. This works well but unfortunately I have to open R every time I want to look to the contents. Would it be also possible to have a second line that saves the contents of the moransI variable in

Re: [R] Data read as labels

2012-05-15 Thread Rui Barradas
Hello, Your data.frame has some noise in the last two rows. See if this works. #--- this is your code --- spec - EU2001 part1 - http://www.bundesbank.de/statistik/statistik_zeitreihen_download.php?func=directcsvfrom=until=filename=bbk_; part2 -

Re: [R] barplot: legend: two rows

2012-05-15 Thread Uwe Ligges
On 15.05.2012 17:38, Marion Wenty wrote: Hello, I solved my problem with the uneven numbers of legend elements, which should be put into more than one rows, in the following way: I added another legend element which is empty () and is filled with white:

Re: [R] save to Rdata file and to txt

2012-05-15 Thread David L Carlson
capture.output(moransI, file=moransI.txt) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-

Re: [R] pass objects into ... (dot dot dot)

2012-05-15 Thread Ben quant
Thank you for that. Sorry, I don't know how to use that to solve the issue. I need to pass a handful (an unknown length) of objects into I see how you can get the count of what is in ..., but I'm not seeing how knowing the length in ... will help me. ben On Tue, May 15, 2012 at 10:53 AM,

[R] Lattice: Add abline to Single Value qqmath() Plot

2012-05-15 Thread Rich Shepard
The data are not normally distributed when untransformed and I'm trying various transformations to see if any would be appropriate to use. The lattice book (fig. 3.10) shows a 2-sample Q-Q plot with an abline but the code for the figure does not include the line. I'd appreciate a pointer to

Re: [R] Data read as labels

2012-05-15 Thread David Winsemius
On May 15, 2012, at 11:13 AM, barb wrote: Hey David, i tried all this - it doesn´t work :( Sadder and less informative words were never written! Learn to express in natural language or in code what you were expecting rather than use the phrase doesn't work which can mean one of an

  1   2   >