Re: [R] Problems Exporting R Output to an xls file need help

2012-05-06 Thread Petr PIKAL
Hi Or you can use base function write.table(varxls, file="some output file.xls", sep = "\t", row.names = F) Regards Petr > > As it says, you need to supply a file name to be outputted to. > > write.xls(, file = "abc.xls") > > Michael > > On Fri, May 4, 2012 at 11:31 AM, PaulJr wrote:

Re: [R] Statistical power of correlations.

2012-05-06 Thread peter dalgaard
On May 7, 2012, at 07:44 , Collin Lynch wrote: > My apologies for the statistical naivete of my question but... > > Is there an established method or calulating the statistical power of a > correlation test? And if so is there a method in R for it? There's a pwr.r.test in the "pwr" package. Th

[R] Statistical power of correlations.

2012-05-06 Thread Collin Lynch
My apologies for the statistical naivete of my question but... Is there an established method or calulating the statistical power of a correlation test? And if so is there a method in R for it? Thank you, Collin Lynch. __ R-help@r-proj

Re: [R] uneven vector length issue with read.zoo?

2012-05-06 Thread knavero
For simplicity sake though, yes I understand the issue and solution, and the solution using read.table, na.omit, and read.zoo is sound. Thanks Gabor! :) -- View this message in context: http://r.789695.n4.nabble.com/uneven-vector-length-issue-with-read-zoo-tp4604287p4613983.html Sent from the R h

Re: [R] How to plot stacked histogram in R?

2012-05-06 Thread Manish Gupta
HI, Below is third example. # here we want the full scale from zero to one color.legend(2,6,4,6.4,legend=c("100% guys","100% girls"), rect.col=color.scale(seq(0,1,by=0.25),c(0.2,1),c(0.2,0.4),c(1,0.4))) par(mar=c(5,4,4,2)) # use barp to display a multiple histogram h1<-table(cut(rnorm(100,4),brea

Re: [R] uneven vector length issue with read.zoo?

2012-05-06 Thread knavero
Yeah, I was unclear about what I mean by "uneven vector lengths". I should say "uneven valid vectors" instead where "valid" refers to (1) a field containing a value that is not NA, for this specific case, and (2) a value that is compatible with the vector class assigned through colClasses etc., and

Re: [R] question about transforming data into data frame object

2012-05-06 Thread David Winsemius
On May 6, 2012, at 3:56 PM, E Atescelik wrote: Hi,I had a question about transforming data into data frame object with two columns. I have data "genal2.txt" (see attachment) My data frame called "genal2frame" has to be in the form: genal2frame[1:6,] y mut 10.51

Re: [R] commenting out a block of R code

2012-05-06 Thread Ranjan Maitra
Hi Joshua and Don, Thanks very much! I guess I can now see why one could do that using the editor, but I like Joshua's hack suggestion. I did not think about it:-( Best wishes, Ranjan On Sun, 6 May 2012 19:41:01 -0700 Joshua Wiley wrote: > Hi Ranjan, > > To me, this is really a text editor

Re: [R] commenting out a block of R code

2012-05-06 Thread Don McKenzie
in vi (vim too?), in edit mode :a,bs/^/# /g inserts "# " at the beginning of lines a through b On 6-May-12, at 7:41 PM, Joshua Wiley wrote: Hi Ranjan, To me, this is really a text editors job. Feature-rich editors make it trivial, for example in Emacs, you can select a region (whatever siz

Re: [R] commenting out a block of R code

2012-05-06 Thread Joshua Wiley
Hi Ranjan, To me, this is really a text editors job. Feature-rich editors make it trivial, for example in Emacs, you can select a region (whatever size you want) and M-x comment-region automatically comments every line in that region. Similarly M-x uncomment-region will uncomment every line. If

[R] commenting out a block of R code

2012-05-06 Thread Ranjan Maitra
Dear friends, Is there an easy way of commenting out a block of R code after it has been written? (I am aware that R-aware editors can insert # line-by-line while it is being written, but I want to basically block out chunks of R code in a few strokes.) This question was asked on this mailing li

Re: [R] Saving a variable

2012-05-06 Thread Joshua Wiley
Hi Trying, Jim already suggested youuse write.table(), which I think is really what you want. I also wanted to point out that your outer loop is unnecessary. The following yields identical results and is *much* faster. randz <- matrix(rnorm(100), 500, 2000) H <- matrix(0, 500, 2000) H[1, ]

Re: [R] Saving a variable

2012-05-06 Thread jim holtman
try write.table(H, file = "datad,txt") On Sun, May 6, 2012 at 5:02 PM, Trying To learn again wrote: > Hi all, > > I´m trying to use write function to save the output of a program (my > constructed "H" matrix) > > > randz<-matrix(rnorm(100),500,2000) > > H<-matrix(0,500,2000) > > H[1,]<-randz

[R] Saving a variable

2012-05-06 Thread Trying To learn again
Hi all, I´m trying to use write function to save the output of a program (my constructed "H" matrix) randz<-matrix(rnorm(100),500,2000) H<-matrix(0,500,2000) H[1,]<-randz[1,] for (j in 1:2000){ for (i in 2:500){ if(i<251) H[i,j]<-0.6*H[i-1,j]+randz[i,j] else H[i,j]<-H[i-1,j]+randz[i,j]

Re: [R] Interaction plot between 2 continuous variables

2012-05-06 Thread Ben Bolker
Bert Gunter gene.com> writes: > > This almost certainly has nothing to do with mixed effects models per > se. x1 and x2 are probably ( if what you see is not due to a few > unusual values) correlated, so the standard decomposition into main > and interaction effects does not have the usual meani

[R] CRAN (and crantastic) updates this week

2012-05-06 Thread Crantastic
CRAN (and crantastic) updates this week New packages * condmixt (1.0) Maintainer: Julie Carreau Author(s): Julie Carreau License: GPL-2 http://crantastic.org/packages/condmixt Conditional density estimation with mixtures for heavy-tailed distributions * crrstep (2012-5.

Re: [R] Global variables

2012-05-06 Thread Kenn Konstabel
On Fri, May 4, 2012 at 3:06 PM, Luis Goncalves wrote: > > > On May 2 2011, 3:02 pm, Kenn Konstabel wrote: >> On Mon, May 2, 2011 at 2:19 PM, abhagwat wrote: >> > Well, what would be really helpful is to restrict the scope of all >> > non-function variables, but keep a global for scope of all fun

Re: [R] uneven vector length issue with read.zoo?

2012-05-06 Thread Gabor Grothendieck
On Sun, May 6, 2012 at 3:42 PM, knavero wrote: > Right, but it seems to me that the error being the NA's in the index field > are caused by the longer vector lengths of columns 4 and 5. I would think > that the EOF in the scanf() (assuming C is used for the source code) would > be called where the

Re: [R] how to download data from soap server using R

2012-05-06 Thread Duncan Temple Lang
There is a kegg package available from the BioConductor repository. Also, you can generate an interface via the SSOAP package: library(SSOAP) w = processWSDL(http://soap.genome.jp/KEGG.wsdl) iface = genSOAPClientInterface(, ) iface@functions$list_datbases() D. On 5/6/12 3:01 AM, sa

Re: [R] question about transforming data into data frame object

2012-05-06 Thread Jeff Newmiller
Not sure what your question was. Perhaps you could look up the reshape2 package and ask a more specific question? --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#.

Re: [R] Interaction plot between 2 continuous variables

2012-05-06 Thread Bert Gunter
This almost certainly has nothing to do with mixed effects models per se. x1 and x2 are probably ( if what you see is not due to a few unusual values) correlated, so the standard decomposition into main and interaction effects does not have the usual meaningful interpretation (e,g, that you would g

Re: [R] uneven vector length issue with read.zoo?

2012-05-06 Thread knavero
Right, but it seems to me that the error being the NA's in the index field are caused by the longer vector lengths of columns 4 and 5. I would think that the EOF in the scanf() (assuming C is used for the source code) would be called where the NA's begin in columns 1 and 2 since columns 3:5 are nul

[R] I need some help

2012-05-06 Thread nagy edina
I would like to ask some help for the following object, because I don’t know which command in R-project should I use or how to start to solve it. I attached the file if it is needed.Any help or advice is appreciated. FWHM (Full Width at Half Maximum) attribution’s correlation need to be investig

Re: [R] overlapping confidence bands for predicted probabilities from a logistic model

2012-05-06 Thread Malcolm Fairbrother
For the record, I was overlooking the obvious point that the statistical significance of the coefficient indicates only that the confidence interval for the *difference* in predicted probabilities will not overlap zero. It does not indicate that the two confidence intervals I was originally calc

[R] question about transforming data into data frame object

2012-05-06 Thread E Atescelik
Hi,I had a question about transforming data into data frame object with two columns. I have data "genal2.txt" (see attachment) My data frame called "genal2frame" has to be in the form: genal2frame[1:6,] y mut 10.51056180.005 20.34283920.005 30.5490

[R] Interaction plot between 2 continuous variables

2012-05-06 Thread Eiko Fried
I have two very strong fixed effects in a LMM (both continuous variables). model <- lmer( y ~ time + x1+x2 + (time|subject)) Once I fit an interaction of these variables, both main effects disappear and I get a strong interaction effect. model <- lmer( y ~ time + x1*x2 + (time|subject)) I would l

Re: [R] PLot a matrix

2012-05-06 Thread David L Carlson
Assuming Windows OS with the data you attached copied to the clipboard: TSdata <- read.table("clipboard", header=FALSE, sep="", na.strings="NA", dec=".", strip.white=TRUE) Then just matplot(TSdata, type="l") But you will probably want to select your own colors, line types, and add a legend:

Re: [R] creating a new column assigning values of other columns

2012-05-06 Thread Santiago Guallar
It apparently works now. Something weird happens, though: the new column sums 1 extra hour and assigns the day according to its own time. To solve it I subtracted 1 hour to this new column:  niga$night<- as.POSIXct ( ifelse(niga$h>=0 & niga$h<9, niga$a, niga$timepos), origin="1970-01-01") # it w

Re: [R] How to do division calculation in R?

2012-05-06 Thread Petr Savicky
On Sun, May 06, 2012 at 05:19:30PM +0800, xiaocong zuo wrote: > Dear all, > > Sorry, I means if we must remove the nonparameter value then do the > division calculation or there is any other ways to do? Hello: Do you mean division of numbers, functions or some other objects? Division of numbers

Re: [R] Understanding custom contrasts

2012-05-06 Thread peter dalgaard
On May 6, 2012, at 17:59 , Sandy Miller wrote: > I have a question regarding customising contrasts for linear models I > read the section in Fox/Weisberg's CAR (2nd ed.) and was > thinking--apparently erroneously--that the following two snippets > would do the same: > > # approach 1: default tre

Re: [R] PLot a matrix

2012-05-06 Thread Gabor Grothendieck
On Sun, May 6, 2012 at 11:39 AM, Trying To learn again wrote: > Hi, > > I want to plot this matrix (I attach the data), it is suposed that each > column is a different time series. > > If I do > > g<-read.table("dataADF.txt", header=F) > > and > > plot(g[,1],type="l") > > it  plots the first colum

Re: [R] PLot a matrix

2012-05-06 Thread Sarah Goslee
You can use lines() to add additional lines to your plot. Sarah On Sun, May 6, 2012 at 11:39 AM, Trying To learn again wrote: > Hi, > > I want to plot this matrix (I attach the data), it is suposed that each > column is a different time series. > > If I do > > g<-read.table("dataADF.txt", header

Re: [R] paper submission help

2012-05-06 Thread Berend Hasselman
On 06-05-2012, at 16:54, Sandeep Khullar wrote: > Hello Sir/Madam, > > > > i am interested to send the paper in the R journal please provide me the > information of address submission so i can easily send the paper to the > editor of chief. It's Editor-in-Chief. Come on. You could at leas

Re: [R] paper submission help

2012-05-06 Thread Uwe Ligges
On 06.05.2012 16:54, Sandeep Khullar wrote: Hello Sir/Madam, i am interested to send the paper in the R journal please provide me the information of address submission so i can easily send the paper to the editor of chief. Google "R Journal"? It will point you to http://journal.r-projec

[R] Understanding custom contrasts

2012-05-06 Thread Sandy Miller
I have a question regarding customising contrasts for linear models I read the section in Fox/Weisberg's CAR (2nd ed.) and was thinking--apparently erroneously--that the following two snippets would do the same: # approach 1: default treatment contrasts # generate data set.seed() y <- c(rnorm(

[R] paper submission help

2012-05-06 Thread Sandeep Khullar
Hello Sir/Madam, i am interested to send the paper in the R journal please provide me the information of address submission so i can easily send the paper to the editor of chief. [[alternative HTML version deleted]] __ R-help@r-project.org

[R] PLot a matrix

2012-05-06 Thread Trying To learn again
Hi, I want to plot this matrix (I attach the data), it is suposed that each column is a different time series. If I do g<-read.table("dataADF.txt", header=F) and plot(g[,1],type="l") it plots the first column plot if I want in a unique graph each colums of dataA, all in one. How should I pro

[R] Steps to determine Hurst exponent

2012-05-06 Thread Barun Saha
Hello, I'm using the fArma package to estimate Hurst exponent by R/S method. I've some measurements in the following format: Call_number Call_duration I'm using the following steps. Am new to R, so it would help if someone could please confirm if my steps are correct. Further, this method seems

Re: [R] Translation of matlab vectors code into r

2012-05-06 Thread Hans W Borchers
Haio gmail.com> writes: > > Hi there > I am new user of r, i would need some help to translate som code for vectors > in matlab to r. I have managed to translate the first 7 rows, but not the > rest. Could anyone give me any suggestions for this problem?? > > Matlab code: > > tempo=[]; > temps

Re: [R] how to do the concentration-time profiles in R?

2012-05-06 Thread John Kane
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. You need to supply us with some information about what you are doing and preferebly some code and data. A handy way to provide data is with dput()

[R] how to download data from soap server using R

2012-05-06 Thread sagarnikam123
i don't know perl,but on server site,they give soap:lite using perl , go to--->http://www.kegg.jp/kegg/soap/doc/keggapi_manual.html i want to download data from kegg server ,using R only, how to proceed? & what is mean by SOAP client driver ? also go to http://soap.genome.jp/KEGG.wsdl -- View thi

Re: [R] Lambert (1992) simulation

2012-05-06 Thread Achim Zeileis
On Sat, 5 May 2012, Christopher Desjardins wrote: Hi, I am a little confused at the output from predict() for a zeroinfl object. Here's my confusion: ## From zeroinfl package fm_zinb2 <- zeroinfl(art ~ . | ., data = bioChemists, dist = "negbin") ## The raw zero-inflated overdispersed data >

Re: [R] Query about memory used in list and dataframe

2012-05-06 Thread Rui Barradas
Hello, Also, note that to rbind data frames, like the op says, takes less memory than to cbind. x <- 1:6 list.1 <- list(x,x,x,x,x,x,x,x,x,x,x,x) test.df3 <- as.data.frame(do.call(cbind, list.2)) test.df4 <- as.data.frame(do.call(rbind, list.2)) object.size(list.1) object.size(test.df3) object.s

Re: [R] How to do division calculation in R?

2012-05-06 Thread Rui Barradas
Hello, I'm not very comfortable with nonparametric division, but maybe the bar operator will do. help("/") Hope this helps, Rui Barradas xiaocong zuo wrote > > Dear all, > > Sorry, I means if we must remove the nonparameter value then do the > division calculation or there is any other ways

Re: [R] creating a new column assigning values of other columns

2012-05-06 Thread R. Michael Weylandt
It looks like part of your problem is that some of your time/date variables are stored as factors rather than actual times / dates. Use str() to see which ones and try to convert those. You'll need this format string: format = "%d/%m/%y %H:%M:%S" for the ones that are currently factors. As regards

Re: [R] Translation of matlab vectors code into r

2012-05-06 Thread R. Michael Weylandt
Perhaps read An Intro to R (shipped with every packaging of R -- type help.start() to get it) and then look at http://cran.r-project.org/doc/contrib/Hiebeler-matlabR.pdf n_o, nan_s, etc. are not functions I have in my Matlab distribution so I can't give more advice without knowing what they actua

[R] Translation of matlab vectors code into r

2012-05-06 Thread Haio
Hi there I am new user of r, i would need some help to translate som code for vectors in matlab to r. I have managed to translate the first 7 rows, but not the rest. Could anyone give me any suggestions for this problem?? Matlab code: tempo=[]; temps=[]; tempn=[]; tempao=[]; tempas=[]; tempan=[

Re: [R] correlation between XY coordinates

2012-05-06 Thread Sarah Goslee
Hi Chris, To get a single value you might need something like a Mantel test, available in both ecodist and vegan. That test is a permutation test of significance of the correlation between two distance matrices. Sarah On May 6, 2012, at 8:06 AM, Christopher Kurby wrote: > Hey Josh (and every

Re: [R] correlation between XY coordinates

2012-05-06 Thread Christopher Kurby
Hey Josh (and everyone), My apologies, let me be more specific. I have two sets of XY coordinates in Cartesian space. I would like to compute a correlation between the two sets. For example, let's say I have two N X 2 matrices, with the first column being the X coordinate, the second column bei

Re: [R] How to do division calculation in R?

2012-05-06 Thread xiaocong zuo
Dear all, Sorry, I means if we must remove the nonparameter value then do the division calculation or there is any other ways to do? Thank you! Xiaoc 2012/5/6 xiaocong zuo > Dear all, > > Could you please tell me how to do the division calculation in R? That is > to say how to perform the ope

Re: [R] creating a new column assigning values of other columns

2012-05-06 Thread Santiago Guallar
Hi Michael, Yes, I tried ifelse() before but this function returns a numeric value. When I try to convert it back to POSIXct I get a *. If I use if else I get a POSIXct output although it does not return a correct answer (it only returns y$timepos even when the condition "h<9" fails to be met).

[R] How to do division calculation in R?

2012-05-06 Thread xiaocong zuo
Dear all, Could you please tell me how to do the division calculation in R? That is to say how to perform the operation of division in R software. Thank you! Xiaoc [[alternative HTML version deleted]] __ R-help@r-project.org mailing list http

[R] how to do the concentration-time profiles in R?

2012-05-06 Thread xiaocong zuo
Hi, Dear all, Could you please tell me how to select specified column in dataset and how to do the concentration-time profiles in R? Thank you! xiaoc [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.

[R] (no subject)

2012-05-06 Thread xiaocong zuo
Hi, Dear all, Could you please tell me how to select specified column in dataset and do the concentration-time profiles in R? Thank you! xiaoc [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mail