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  1-n_ac

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] 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 o

[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 k

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

2013-03-27 Thread Charles Berry
Mark Orr 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 <- matrix

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 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] 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. https://stat.ethz.ch/pipermail/r-sig-mixed-models/20

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 | c

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 David Winsemius
On Mar 27, 2013, at 7:00 PM, Ben Bolker wrote: > Michael Grant 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 func

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

2013-03-27 Thread Ben Bolker
Michael Grant 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 the syntax

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Marc Schwartz
On Mar 27, 2013, at 7:53 PM, David Winsemius wrote: > > On Mar 27, 2013, at 12:18 PM, Marc Schwartz wrote: > >> >> On Mar 27, 2013, at 1:58 PM, Katherine Gobin >> wrote: >> >>> Dear R helpers, >>> >>> Everyday I do receive many many mails from R forum and after some period of >>> times,

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 > 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

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.   http://stackoverflow.com/questions/9916283/twitter-roauth-and-windows-register-ok-but-certificate-ver

[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 __ R-

[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 unde

[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 l

[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

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")

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) > >

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 https://stat.ethz.ch/mailman/listi

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 wrote: From: Mason Subject: Re: [R] Archieve of mails from R forum To: "Marc Schwartz" Cc: "Katherine Gobin" , "r-help@r-project.org hel

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 proport

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,     FALSE

[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

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 http://www.soc.hawaii.edu/mor

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 = c(TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TR

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 f

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 NA

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

2013-03-27 Thread Thomas Lumley
On Thu, Mar 28, 2013 at 5:07 AM, rm 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 would ver

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 = c(FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,FALS

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 <- sweep(rowsu

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 whic

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 wrote: > > On Mar 27, 2013, at 1:58 PM, Katherine Gobin > wrote: > > > Dear R helpers, > > > > Everyday I do receive many many mails from R forum and after some perio

Re: [R] Archieve of mails from R forum

2013-03-27 Thread Marc Schwartz
On Mar 27, 2013, at 1:58 PM, Katherine Gobin 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 difficult to keep tra

[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 t

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 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 constraint l

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 start

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<- c

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) >>

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 t

[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) =

[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 <- length(samples)+norde

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 res

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 wrote: > > 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, > > This is

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

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 27

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:

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 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 replace th

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 window

[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 https://stat.ethz.c

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: P

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 3

[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, at=seq(

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

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] 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<- colSums

[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("forwar

[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]]

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 hav

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 I

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 behav

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 at

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 wrote: > Hello all! > I want to create animated chart of

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] Averaging Out many rows from a column AND funtion to string

2013-03-27 Thread Alaios
see inline From: PIKAL Petr 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] Averaging Out many rows

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

2013-03-27 Thread Martin Maechler
> Shane Carey > 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 da

[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, ext.

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 To: Camilo Mora Cc: R help Sent: Wednesday, March 27, 2013 9:09 AM Subject: Re: [R] conditional Datafram

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

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 mailto:petr.pi...@precheza.cz>> To: Alaios mailto:al

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=TRU

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 (auto)correlation

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

2013-03-27 Thread Alaios
see inline From: PIKAL Petr 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 [mailto:r-help-bounces@r- > project.org] On

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 la

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 =

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

[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 to

[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 plot

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 > --