[R] Creating mean C columns out of As and Bs

2013-03-27 Thread Michael Budnick
I am working on a gene expression microarray dataset, each sample has been taking from animal A and animal B on the same type of microarray. I would like to take the mean of these columns and create a dataset with columns with data which are means of the corresponding rows of A and B For

[R] Conditional CCA and Monte Carlo - Help!

2013-03-27 Thread MWilson
Hi All, I am using canonical correspondence analysis to compare a community composition matrix to a matrix of sample spatial relationships and environmental variables. In order to parse out how much variance is explained purely by space (S/E) or the environment (E/S) I am using a conditional

Re: [R] Creating mean C columns out of As and Bs

2013-03-27 Thread David Winsemius
On Mar 26, 2013, at 6:50 PM, Michael Budnick wrote: I am working on a gene expression microarray dataset, each sample has been taking from animal A and animal B on the same type of microarray. I would like to take the mean of these columns and create a dataset with columns with data

Re: [R] NaNS Error Message

2013-03-27 Thread PIKAL Petr
Hi If you can not share information you need to solve your problems yourself. you can trace code by some print statements sn-(S-n);snfact-gamma(sn); print(sn) or use ?debug as Sarah pointed out, n is probably greater than 100 and in that case gamma(sn) results in NaN. Regards Petr

[R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread Alaios
Dear all, 1) I have a very large matrix of  str(keep)  num [1:153899, 1:3415] -98.6 -95.8 -96.4 -95.8 -98 ... that  I would like to reduce its size to something like str(keep)  num [1:1000, 1:3415] -98.6 -95.8 -96.4 -95.8 -98 ...  or anything similar in size as this is a matrix that needs

[R] conditional Dataframe filling

2013-03-27 Thread Camilo Mora
Hi everyone: This may be trivial but I just have not been able to figure it out. Imagine the following dataframe: a b c d TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE FALSE I would like to create a new dataframe, in which TRUE gets 0 but if false then add 1

Re: [R] How to use parentheses and degree symbol together?

2013-03-27 Thread Patrick Connolly
On Tue, 26-Mar-2013 at 05:05PM +0900, Pascal Oettli wrote: | Hi, | | You are right. The following should solve that problem: | | plot(0, 0, pch = ) | text(0, .5, expression(Temperature~(degree*C))) It's not *exactly* the same. It uses a different font family for the brackets, evidently from

Re: [R] conditional Dataframe filling

2013-03-27 Thread Blaser Nello
Here's a possible solution. dd - structure(list(a = c(TRUE, FALSE, FALSE), b = c(TRUE, FALSE, TRUE), c = c(TRUE, FALSE, FALSE), d = c(TRUE, TRUE, FALSE)), .Names = c(a, b, c, d), row.names = c(NA,

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Alaios Sent: Wednesday, March 27, 2013 9:13 AM To: R help Subject: [R] Averaging Out many rows from a column AND funtion to string Dear all, 1) I have a very large

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread Alaios
see inline From: PIKAL Petr petr.pi...@precheza.cz Sent: Wednesday, March 27, 2013 11:24 AM Subject: RE: [R] Averaging Out many rows from a column AND funtion to string Hi -Original Message- From: r-help-boun...@r-project.org

Re: [R] Newey West HAC for pooled cross-section data

2013-03-27 Thread Achim Zeileis
On Tue, 26 Mar 2013, SHISHIR MATHUR wrote: Thanks for the reply Achim. The reason I suspect autocorrelation is because I think that  within the same neighborhood, homes sold a few months back are likely to impact the price of homes sold subsequently. This may well be spatial

Re: [R] Automatic script for updating packages in R

2013-03-27 Thread Twaha Mlwilo
Baer,Thank you for help.huu Date: Mon, 25 Mar 2013 08:20:28 -0500 From: rb...@atsu.edu To: petr.pi...@precheza.cz CC: uddessy2...@hotmail.com; r-h...@stat.math.ethz.ch Subject: Re: [R] Automatic script for updating packages in R try, update.packages(ask='graphics', checkBuilt=TRUE)

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread PIKAL Petr
Hi From: Alaios [mailto:ala...@yahoo.com] Sent: Wednesday, March 27, 2013 11:46 AM To: PIKAL Petr; R help Subject: Re: [R] Averaging Out many rows from a column AND funtion to string see inline From: PIKAL Petr petr.pi...@precheza.czmailto:petr.pi...@precheza.cz

Re: [R] conditional Dataframe filling

2013-03-27 Thread arun
Hi, You could try: dat1- read.table(text= a    b    c    d TRUE  TRUE  TRUE  TRUE FALSE FALSE FALSE TRUE FALSE  TRUE  FALSE  FALSE ,sep=,header=TRUE) dat2-dat1  dat2[]-t(apply(1*!dat1,1,function(x) unlist(lapply(split(x,cumsum(c(0,abs(diff(x),cumsum  dat2 #  a b c d #1 0 0 0 0 #2 1 2 3

Re: [R] conditional Dataframe filling

2013-03-27 Thread arun
HI, Just a correction: : dat2[]-t(apply(!dat1,1,function(x) unlist(lapply(split(x,cumsum(c(0,abs(diff(x),cumsum  #should also work A.K. - Original Message - From: arun smartpink...@yahoo.com To: Camilo Mora cm...@dal.ca Cc: R help r-help@r-project.org Sent: Wednesday, March

[R] animated charts

2013-03-27 Thread catalin roibu
Hello all! I want to create animated chart of temperature variation in last century. how can I do this with R? Thank you! -- --- Catalin-Constantin ROIBU Forestry engineer, PhD Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230 52 29 78,

Re: [R] How do I show real values on a log10 histogram

2013-03-27 Thread Martin Maechler
Shane Carey careys...@gmail.com on Tue, 26 Mar 2013 11:03:20 + writes: Yup, Ive tried all these things and I think Johns might be the best approach, well, :-) you have not yet seen the following one : if(!require(sfsmisc)) install.packages(sfsmisc) require(sfsmisc) ## the

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread Alaios
see inline From: PIKAL Petr petr.pi...@precheza.cz Sent: Wednesday, March 27, 2013 1:50 PM Subject: RE: [R] Averaging Out many rows from a column AND funtion to string Hi   Sent: Wednesday, March 27, 2013 11:46 AM To: PIKAL Petr; R help Subject: Re: [R]

Re: [R] How do I show real values on a log10 histogram

2013-03-27 Thread John Kane
Well, I don't think that is what Shane wants either but my suggestion is clearly wrong. I was reading the question as a dual axis not just a suplimentary , equivalent value axis. DUH. What I think he wants is what IIRC Petr orginally suggested which is this.. Create the data to be graphed

Re: [R] animated charts

2013-03-27 Thread Shane Carey
maybe try the shiny examples that use googleviz. Have a look at the following link: https://code.google.com/p/google-motion-charts-with-r/ I would be interested to know what you decide. Thanks On Wed, Mar 27, 2013 at 1:20 PM, catalin roibu catalinro...@gmail.comwrote: Hello all! I want to

Re: [R] How do I show real values on a log10 histogram

2013-03-27 Thread Shane Carey
Yes, what I wanted was the original suggestion and that is what I went with. John, I found a solution around par also. There is a function called split.screen that allows you split the screen up, and also use par at the same time. Thanks everyone for all your help. Cheers On Wed, Mar 27, 2013

Re: [R] Odd graphic device behavior

2013-03-27 Thread John Kane
Any chance that you made an earlier call to par() resetting cex in your session? I just had that happen. John Kane Kingston ON Canada -Original Message- From: tea...@gmail.com Sent: Tue, 26 Mar 2013 10:15:33 -0400 To: r-help@r-project.org Subject: [R] Odd graphic device behavior

Re: [R] How do I show real values on a log10 histogram

2013-03-27 Thread John Kane
Glad it worked. Sorry to mislead you so badly. John Kane Kingston ON Canada -Original Message- From: careys...@gmail.com Sent: Wed, 27 Mar 2013 14:09:58 + To: jrkrid...@inbox.com Subject: Re: [R] How do I show real values on a log10 histogram Yes, what

Re: [R] animated charts

2013-03-27 Thread Andrius Druzinis
Dear Catalin, If you have an R function that plots a fragment of your data and takes the specific fragment selection as parameter, you can readily turn this into a Shiny app. The slider control (see example in http://rstudio.github.com/shiny/tutorial/#sliders) in Shiny can be animated (you can

[R] FMOLS DOLS and ADL regression

2013-03-27 Thread Chien-Ho Wang
Whether can any R package run Full modified OLS (Phillips and Hansen 1990 ), DOLS (Stock and Watson 1993) and ADL model (Pesaran and Shin 2001) for cointegrated VAR model? I cannot find any useful order in VAR and SVAR package. Thanks. Eric Wang [[alternative HTML version deleted]]

[R] Crrstep help

2013-03-27 Thread Kathy Han
Hi, I'm using crrstep package to do stepwise covariate selection for the Fine Gray competing risks regression model. However, I keep getting an error (please see below). Please help!! PHstep - crrstep(years~1+var1+var2+var3+var4+var5,scope.min=~1,censorcmprsk, data=crisk, direction=c(forward),

Re: [R] Distance calculation

2013-03-27 Thread arun
HI, Try this: dat1- read.csv(DQP.csv,sep=\t) res- do.call(cbind,lapply(seq_len(nrow(dat1)),function(i) do.call(rbind,lapply(split(rbind(dat1[i,],dat1[-i,]),1:nrow(rbind(dat1[i,],dat1[-i,]))), function(x) {x1-rbind(dat1[i,],x);colnames(x1)-gsub([.],,colnames(x1));  if({indx-

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread PIKAL Petr
Hi str(as.matrix(keep.ag[,-1]) ) # does look like numeric num [1:10, 1:30] 75.1 93 79 81.7 76.3 ... - attr(*, dimnames)=List of 2 ..$ : NULL ..$ : chr [1:30] V1 V2 V3 V4 ... Please read and follow what was recommended. quote use as.matrix(data.frame) on numeric part

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread Alaios
I have fixed it like that: keep-matrix(data=rnorm(900,80,20),nrow=30,ncol=30) ShrinkTo-500 idx-cut(1:nrow(keep), ShrinkTo) keep.ag-aggregate(keep, list(idx), mean) PlotMe-data.matrix(keep.ag[2:ShrinkTo]) The only problem is that takes ages to finish. Would it be possible to convert it to

[R] Controlling Raster plots

2013-03-27 Thread Alaios
Hi, I have a few raster layers and I would like to customized their x and y axis. I have tried already something like: require('raster') keep-matrix(data=rnorm(900,80,20),nrow=30,ncol=30) xlab-seq(100e6,200e6,length.out=5) test-raster(keep) plot(test,ylab=,xaxt=n,yaxt=n) axis(1,

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread PIKAL Petr
Hi system.time({ + keep-matrix(data=rnorm(900,80,20),nrow=30,ncol=30) + ShrinkTo-500 + idx-cut(1:nrow(keep), ShrinkTo) + keep.ag-aggregate(keep, list(idx), mean) + PlotMe-as.matrix(keep.ag[,-1]) + }) user system elapsed 29.230.14 29.37 It takes 30 seconds when using 30

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread Alaios
Well my true matrix is of num [1:153899, 1:3415] that I want to convert to something like num [1:1000, 1:3415] (keeping column number the same). I only give subsets here to allow others to run the code at their computer Thanks a lot Regards Alex From:

[R] find and replace characters in a string

2013-03-27 Thread Shane Carey
Hi, I have a string of text as follows LOI . How do I replace the dot with (%) gsub(.,(%),LOI .) gives (%)(%)(%)(%)(%) Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Odd graphic device behavior

2013-03-27 Thread Thomas Adams
John, Thanks for the suggestion, but no. I have even gone so far as to rebuild R from source, re-booted my computer, and tried the 'experiment': require(stats) plot(cars) immediately after starting R. Still the same result. I think it must be related to some default Ubuntu Unity

Re: [R] find and replace characters in a string

2013-03-27 Thread arun
txt-  LOI . gsub([.],%,txt) #[1] LOI % A.K. From: Shane Carey careys...@gmail.com To: r-help@r-project.org Sent: Wednesday, March 27, 2013 12:09 PM Subject: [R] find and replace characters in a string Hi, I have a string of text as follows LOI . How do I

Re: [R] find and replace characters in a string

2013-03-27 Thread Rui Barradas
Hello, The period is a metacharacter so you have to escape it. The period is escaped with a '\'. In it's turn, '\' is a metacharacter so it needs to be escaped. Hence the double'\\'. x - LOI . gsub(\\., (%), x) Hope this helps, Rui Barradas Em 27-03-2013 16:09, Shane Carey escreveu: Hi,

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread PIKAL Petr
Hi Such a big matrix is above capability of my computer as it requires about 4GB (If I compute it correctly) and I have only 2GB. Maybe you could try package data.table which is designed for fast data manipulation. Regards Petr From: Alaios [mailto:ala...@yahoo.com] Sent: Wednesday, March

Re: [R] find and replace characters in a string

2013-03-27 Thread PIKAL Petr
Although I am not an expert, this is simple. txt- LOI . gsub(.,%,txt, fixed=TRUE) Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Rui Barradas Sent: Wednesday, March 27, 2013 5:17 PM To: Shane Carey Cc:

Re: [R] when to use which apply function?

2013-03-27 Thread C W
Thanks for pointing that out. Mike On Tue, Mar 26, 2013 at 6:53 PM, David Winsemius dwinsem...@comcast.netwrote: On Mar 26, 2013, at 2:51 PM, C W wrote: Dear list, I am a little confused as to when to use apply, sapply, tapply, vapply, replicate. I've encountered this several times,

Re: [R] Odd graphic device behavior

2013-03-27 Thread David Winsemius
On Mar 27, 2013, at 9:07 AM, Thomas Adams wrote: John, Thanks for the suggestion, but no. I have even gone so far as to rebuild R from source, re-booted my computer, and tried the 'experiment': require(stats) plot(cars) immediately after starting R. Still the same result. I

[R] Error while using register from fda package

2013-03-27 Thread zoe richards
Hi all, I think I've run into an error caused by my computer's having too little computational power, but I'm not sure. I used the following code to perform continuous registration on two functional objects: lambda1 - 10E-2 norder=8 samples-seq(0,780,length=781) nbasis -

[R] Setting up a model in package dlm()

2013-03-27 Thread Eric Przybylinski
Hello, I apologize for such a basic question, but I have been trying to do this in multiple packages without much success. I am trying to set up a state space model for Kalman filtering. I am using package dlm. The DLM is specified by: observation: y(t) = F(t)*theta(t) + v(t) state: theta(t)

Re: [R] Weighted Kaplan-Meier estimates with R

2013-03-27 Thread rm
Thanks to all of you for your very helpful comments! As Terry suggested, svykm is what I was looking for. While testing that I get the same results with the package survey as with the package survival, I encountered the issue of how to draw survival curves. Apparently the implementations in the

Re: [R] Odd graphic device behavior

2013-03-27 Thread peter dalgaard
On Mar 27, 2013, at 18:11 , David Winsemius wrote: On Mar 27, 2013, at 9:07 AM, Thomas Adams wrote: John, Thanks for the suggestion, but no. I have even gone so far as to rebuild R from source, re-booted my computer, and tried the 'experiment': require(stats) plot(cars)

Re: [R] a similar question

2013-03-27 Thread arun
Hi Elisa, Try this: dat1- read.csv(DQV.csv,sep=\t) res- do.call(cbind,lapply(seq_len(nrow(dat1)),function(i) do.call(rbind,lapply(split(rbind(dat1[i,],dat1[-i,]),1:nrow(rbind(dat1[i,],dat1[-i,]))),function(x) {x1- rbind(dat1[i,],x); colnames(x1)- gsub([.],,colnames(x1)); if({indx-

Re: [R] Odd graphic device behavior

2013-03-27 Thread Thomas Adams
Peter, Thank you. When I run: X11(width=7, height=7), I get the same full-screen graphics device window. Running dev.list() gives me X11cairo Running system(xdpyinfo) looks reasonable I tried running options(device=x11) at the R prompt, but this did not seem to change anything. When I started

Re: [R] Time trends with GAM

2013-03-27 Thread Antonio P. Ramos
Thanks. On Tue, Mar 26, 2013 at 4:45 AM, Simon Wood s.w...@bath.ac.uk wrote: For 1) see reply just sent to R help... Re: [R] Use pcls in mgcv package to achieve constrained cubic spline (I'm assuming you mean to fix the value of the smooth at a particular knot location - i.e. to impose a

[R] Archieve of mails from R forum

2013-03-27 Thread Katherine Gobin
Dear R helpers, Everyday I do receive many many mails from R forum and after some period of times, INBOX is filled with numerous mails. At times if for some period of time, I haven't accessed mails, it becomes difficult to keep track of mails and many times simply due to the volume (and owing

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Marc Schwartz
On Mar 27, 2013, at 1:58 PM, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R helpers, Everyday I do receive many many mails from R forum and after some period of times, INBOX is filled with numerous mails. At times if for some period of time, I haven't accessed mails, it becomes

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Mason
http://r-help.markmail.org/ has a nice interface for searching the archives, too. On Wed, Mar 27, 2013 at 12:18 PM, Marc Schwartz marc_schwa...@me.comwrote: On Mar 27, 2013, at 1:58 PM, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R helpers, Everyday I do receive many many

Re: [R] conditional Dataframe filling

2013-03-27 Thread Camilo Mora
Dear Arun, Thank you very much for your help with this.I did not know where to start looking to solve that problem, so I truly appreciate your input. The line of code you sent seems to work but it duplicates the results. Do you know why that may happen? Below is a larger database, to

Re: [R] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread Law, Jason
This completes in about a second on my system and uses the actual matrix dimensions you quote: nr - 153899 nc - 3415 keep - rnorm(nr * nc, 80, 20) dim(keep) - c(nr, nc) shrink.to - 1000 system.time( { idx - rep(1:shrink.to, length.out = nr) plot.me -

Re: [R] conditional Dataframe filling

2013-03-27 Thread arun
Dear Camilo, How do you want to deal with the NAs? If I remove the NAs: dat1 - structure(list( w = c(TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE), x = c(NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA), y =

Re: [R] Weighted Kaplan-Meier estimates with R

2013-03-27 Thread Thomas Lumley
On Thu, Mar 28, 2013 at 5:07 AM, rm r...@wippies.se wrote: While testing that I get the same results with the package survey as with the package survival, I encountered the issue of how to draw survival curves. Apparently the implementations in the two packages differ, as I show below. I

Re: [R] conditional Dataframe filling

2013-03-27 Thread Camilo Mora
Thanks Arun, Well that is interesting. My intention was to have a dataframe with the same number of rows in the original data, and for the rows with NAs, then return NA (If there are NAs, often the entire row has NAs). What is interesting is that in your code with NAs, the row that has

Re: [R] ggplot2: Controlling line width of panel borders

2013-03-27 Thread thomas . parr
This is an old post, but I had the exact problem described here and after two days of monkeying around in theme, I wanted to provide the non-ggplot related solution. In summary, the problem is that in the faceted plots, lines on the right an bottom in the subplots appear to be thicker than

Re: [R] conditional Dataframe filling

2013-03-27 Thread arun
Dear Camilo, You can do this: dat1 - structure(list( w = c(TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE), x = c(NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA), y = c(FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,FALSE), z =

Re: [R] conditional Dataframe filling

2013-03-27 Thread Camilo Mora
Nice!. Thanks, Camilo Camilo Mora, Ph.D. Department of Geography, University of Hawaii Currently available in Colombia Phone: Country code: 57 Provider code: 313 Phone 776 2282 From the USA or Canada you have to dial 011 57 313 776 2282

[R] prop.test correct true and false gives same answer

2013-03-27 Thread David Arnold
All, How come both of these are the same. Both say 1-sample proportions test without continuity correction. I would suspect one would say without and one would say with. prop.test(118,236,.5,correct=FALSE,conf.level=0.95) 1-sample proportions test without continuity correction data:

Re: [R] conditional Dataframe filling

2013-03-27 Thread arun
Hi Camilo, No problem. In case, you wanted to process the partial NA rows, this could help: datNew- structure(list(a = c(TRUE, NA, FALSE, TRUE, TRUE), b = c(TRUE, NA, FALSE, TRUE, TRUE), c = c(TRUE, NA, FALSE, TRUE, FALSE),     d = c(TRUE, NA, FALSE, TRUE, FALSE), e = c(TRUE, NA, FALSE,    

Re: [R] prop.test correct true and false gives same answer

2013-03-27 Thread Albyn Jones
?prop.test is helpful. Continuity correction is used only if it does not exceed the difference between sample and null proportions in absolute value. albyn On Wed, Mar 27, 2013 at 02:04:51PM -0700, David Arnold wrote: All, How come both of these are the same. Both say 1-sample proportions

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Katherine Gobin
Dear Sir, Thanks a lot for the input. I am sure it will go a long way for me to understand R. Thanks again. Regards Katherine --- On Wed, 27/3/13, Mason ma...@verbasoftware.com wrote: From: Mason ma...@verbasoftware.com Subject: Re: [R] Archieve of mails from R forum To: Marc Schwartz

Re: [R] A simple perceptron neural network (nnet)

2013-03-27 Thread Arturo HULK
can u explain me, how it works your code??? please. i´m also doing a simple perceptron for homework on R and i dont know where to start. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] prop.test correct true and false gives same answer

2013-03-27 Thread Ted Harding
On 27-Mar-2013 21:04:51 David Arnold wrote: All, How come both of these are the same. Both say 1-sample proportions test without continuity correction. I would suspect one would say without and one would say with. prop.test(118,236,.5,correct=FALSE,conf.level=0.95) 1-sample

Re: [R] Odd graphic device behavior

2013-03-27 Thread peter dalgaard
On Mar 27, 2013, at 19:26 , Thomas Adams wrote: Peter, Thank you. When I run: X11(width=7, height=7), I get the same full-screen graphics device window. Running dev.list() gives me X11cairo Running system(xdpyinfo) looks reasonable I tried running options(device=x11) at the R

[R] ::manzhang::

2013-03-27 Thread Man Zhang
http://www.signdesignbooks.com/acsw/df.km?flnu Man Zhang 3/27/2013 11:31:04 PM bf iopo rarv rsh atzwnxfqoijhcwndgcyyyvtllyxaqkmiftoh

[R] Passing arguments between apply and l(s)apply functions vs. nested for loop

2013-03-27 Thread Mark Orr
Hi R community, I have a question concerning passing arguments between apply and lapply? Or maybe, once my problem is explained, the question is really about how to best transform my nested for loops into list/matrix operations; I am just beginning this transformation away from nested for

[R] lmer, p-values and all that

2013-03-27 Thread Michael Grant
Dear Help: I am trying to follow Professor Bates' recommendation, quoted by Professor Crawley in The R Book, p629, to determine whether I should model data using the 'plain old' lm function or the mixed model function lmer by using the syntax anova(lmModel,lmerModel). Apparently I've not

[R] plotting interactive networks in R

2013-03-27 Thread Sachinthaka Abeywardana
Hi all, I was wondering if there was package/ tutorial somewhere so that I can plot INTERACTIVE networks in R. What I mean by interactive is that you can zoom in, twist and rotate, and if necessary move nodes around. Any thoughts? Thanks, Sachin __

Re: [R] Error after R and Twitter Successfull Handshake

2013-03-27 Thread Peter Maclean
  After installing updated twitteR and ROAuth, I am still getting the same error as stated in these links. As there anyone who has been able to solve the prolem? Suggested solution do not work.  

Re: [R] Archieve of mails from R forum

2013-03-27 Thread David Winsemius
On Mar 27, 2013, at 12:18 PM, Marc Schwartz wrote: On Mar 27, 2013, at 1:58 PM, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R helpers, Everyday I do receive many many mails from R forum and after some period of times, INBOX is filled with numerous mails. At times if for

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Marc Schwartz
On Mar 27, 2013, at 7:53 PM, David Winsemius dwinsem...@comcast.net wrote: On Mar 27, 2013, at 12:18 PM, Marc Schwartz wrote: On Mar 27, 2013, at 1:58 PM, Katherine Gobin katherine_go...@yahoo.com wrote: Dear R helpers, Everyday I do receive many many mails from R forum and after

Re: [R] lmer, p-values and all that

2013-03-27 Thread Ben Bolker
Michael Grant michael.grant at colorado.edu writes: Dear Help: I am trying to follow Professor Bates' recommendation, quoted by Professor Crawley in The R Book, p629, to determine whether I should model data using the 'plain old' lm function or the mixed model function lmer by using

Re: [R] lmer, p-values and all that

2013-03-27 Thread David Winsemius
On Mar 27, 2013, at 7:00 PM, Ben Bolker wrote: Michael Grant michael.grant at colorado.edu writes: Dear Help: I am trying to follow Professor Bates' recommendation, quoted by Professor Crawley in The R Book, p629, to determine whether I should model data using the 'plain old' lm

Re: [R] lmer, p-values and all that

2013-03-27 Thread Nicole Ford
i literally just ran one. when i ran one of mine and the did summary(mod) i get the following: mod - lmer(dem ~ xbar + cpi + (1 | country), data=wvsAB) summary(mod) Linear mixed model fit by REML Formula: dem ~ xbar + cpi + (1 | country) Data: wvsAB AIC BIC logLik deviance REMLdev

Re: [R] lmer, p-values and all that

2013-03-27 Thread Nicole Ford
i meant to add, i am not sure if an example lmer model woulf be helpful, since i can't see the OP. On Mar 27, 2013, at 10:13 PM, Nicole Ford wrote: i literally just ran one. when i ran one of mine and the did summary(mod) i get the following: mod - lmer(dem ~ xbar + cpi + (1 | country),

Re: [R] lmer, p-values and all that

2013-03-27 Thread Nicole Ford
i did find this for you, down towards the end, they discuss the anova method. i am on my way to a bayesian analysis/lmer is a step towards that- so i won't be doing anova. i can't be of much specific help with that question, but here you go.

Re: [R] lmer, p-values and all that

2013-03-27 Thread Ben Bolker
On 13-03-27 10:10 PM, David Winsemius wrote: On Mar 27, 2013, at 7:00 PM, Ben Bolker wrote: Michael Grant michael.grant at colorado.edu writes: Dear Help: I am trying to follow Professor Bates' recommendation, quoted by Professor Crawley in The R Book, p629, to determine whether I should

Re: [R] Passing arguments between apply and l(s)apply functions vs. nested for loop

2013-03-27 Thread Charles Berry
Mark Orr mo2259 at columbia.edu writes: Hi R community, I have a question concerning passing arguments between apply and lapply? [snip] #START CODE SNIPPET #LIST AND VECTOR rm(list=ls()) l - list(1:3,2:3,4:10,7:9) v - 1:3 #USED IN j loop to catch values catch.mat -

[R] how to call R in PHP

2013-03-27 Thread Lauren Zhang
Hi, I met tough problems when calling R in PHP. I have tried several ways, but none of them succeed.  first of all, I tried Rserve, but I failed to connect to it. Then, I tried cmd.exe. I get the result when I use R CMD BATCH --vanilla... in cmd, but I have no idea how to call cmd in php. I

Re: [R] CRAN R Help

2013-03-27 Thread arun
Dear Katherine, For your first question: If you are creating these files in a specific folder, then list.files() #[1] Individual_Present_Value_BONDS.csv  Individual_Present_Value_Equity.csv #[3] Individual_Present_Value_FOREX.csv gives you which files are present.  But, suppose you have other

Re: [R] how to call R in PHP

2013-03-27 Thread Jeff Newmiller
While someone around here might know about PHP (I don't h, the fact that you don't know how to call system suggests that you should be asking in a PHP help forum. Rserve can be used for interactive sessions, but web services usually aren't designed that way, so you probably want to call R with

Re: [R] new question

2013-03-27 Thread arun
Hi, Regarding the first question: ListFacGroup-  lapply(ListFacGroup,unique)  Spec(ListFacGroup,0.05) #  #   Seq Mod z a2 c2 c3 t2 #1    aAATATAGPR  1-n_acPro/ 2  1  0  0  1 #2 aAAASSPVGVGQR