Re: [R] failure to replayPlot() a recordedplot object saved in a previous session?

2013-09-25 Thread Gergely Daróczi
It might worth checking out this nice workaround of JJ: https://github.com/Rapporter/pander/blob/master/R/evals.R#L1135 Best, Gergely On 25 September 2013 02:35, Paul Murrell p...@stat.auckland.ac.nz wrote: Hi Attempting to use a display list snapshot (as created by recordPlot()) between R

[R] How can I draw a 3D diagram (persp) with these Infos

2013-09-25 Thread Babak Bastan
I want to have a 3D diagramm. My Information are: - x:Time - it could be 1:n (integer number) - Y:Frequency ---it could be 1:n like x z:the value of z come from a function *fft_amplitude - function(x) {sqrt((Re(fft(x)))^2+(Im(fft(x)))^2)}* ** The input values for this function

Re: [R] How can I draw a 3D diagram (persp) with these Infos

2013-09-25 Thread Pascal Oettli
Hello, This request looks very similar to: http://stackoverflow.com/questions/18982662/showing-a-3d-diagram-in-r http://stackoverflow.com/questions/18913143/non-numeric-argument-error-while-running-fft-on-a-matrix Regards, Pascal 2013/9/25 Babak Bastan babak...@gmail.com I want to have a 3D

Re: [R] Computing calculation among two vectors

2013-09-25 Thread arun
Hi, Try: x- 1:4  y- c(*,/,-,+) res-sapply(y,function(i) {x1-expand.grid(x,x); unlist(lapply(paste0(x1[,1],i,x1[,2]),function(u) eval(parse(text=u}) row.names(res)- as.character(interaction(expand.grid(x,x),sep=_)) head(res) #    *   /  - + #1_1 1 1.0  0 2 #2_1 2 2.0  1 3 #3_1 3 3.0  2 4 #4_1

[R] Space between x-axis ticks

2013-09-25 Thread mohan . radhakrishnan
Hi, I am trying to clearly show the values in the x-axis in the attached graph. The tick marks are too close and the labels are blurred. plot(as.numeric(data$Var1),data$Freq,ylim=c(0,700),col=green,type=o,ylab=Number of connections,las=2,lwd=2.5,xaxt=n,xlab=IP)

Re: [R] Graph is without line

2013-09-25 Thread PIKAL Petr
Hi It is mostly question of personal preference. Factors have some nice features when manipulating with levels, sorting, and/or using numeric annotation. However when you want to add some new value to factor it is trickier than with plain string vectors. Maybe it is time to look into R-intro

Re: [R] Confusing behaviour in data.table: unexpectedly changing variable

2013-09-25 Thread Matthew Dowle
Very sorry to hear this bit you. If you need a copy of names before changing them by reference : oldnames - copy(names(DT)) This will be documented and it's on the bug list to do so. copy is needed in other circumstances too, see ?copy. More details here :

Re: [R] Rmpfr question

2013-09-25 Thread Martin Maechler
Michel michelgo...@free.fr on Tue, 24 Sep 2013 12:22:10 +0200 writes: Hello, Thanks for your answer The file does not contains numbers in high precision but all the calculation applied to these data will be In attachment a text file containing some lines And her

Re: [R] Space between x-axis ticks

2013-09-25 Thread mohan . radhakrishnan
Looks like graph cannot be attached. Mohan From: mohan.radhakrish...@polarisft.com To: r-help@r-project.org Date: 09/25/2013 12:41 PM Subject:[R] Space between x-axis ticks Sent by:r-help-boun...@r-project.org Hi, I am trying to clearly show the values in

Re: [R] Rmpfr question

2013-09-25 Thread Martin Maechler
Martin Maechler maech...@lynne.ethz.ch on Wed, 25 Sep 2013 11:08:07 +0200 writes: Michel michelgo...@free.fr on Tue, 24 Sep 2013 12:22:10 +0200 writes: Hello, Thanks for your answer The file does not contains numbers in high precision but all the calculation applied

Re: [R] Space between x-axis ticks

2013-09-25 Thread PIKAL Petr
Hi If you did PLEASE do read the posting guide http://www.R-project.org/posting- guide.html you could find No binary attachments except for PS, PDF, and some image and archive formats (others are automatically stripped off because they can contain malicious software). Files in other formats

[R] R 3.0.2 is released

2013-09-25 Thread Peter Dalgaard
The build system rolled up R-3.0.2.tar.gz (codename Frisbee Sailing) this morning. The list below details the changes in this release. You can get the source code from http://cran.r-project.org/src/base/R-3/R-3.0.2.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries

[R] Cosine window in r

2013-09-25 Thread Babak Bastan
Hi experts Can some one tell me, how can I implement Cosine window in r? Is there a function for that? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Creating a new column to a data frame using a formula from another variable

2013-09-25 Thread arun
Hi, Change: aa$z-  eval(parse(text=bb))  aa #  x y  z #1 2 3  3 #2 4 5  7 #3 6 7 11 A.K. I want to create a new column to a data frame using a formula from another variable: Example: I have a data set aa is; x    y 2    3 4    5 6    7 My R code is; bb - x+y-2 attach(aa) aa$z- bb

Re: [R] Creating a new column to a data frame using a formula from another variable

2013-09-25 Thread arun
Also, Instead of ?attach, you could try ?with or ?within aa$z- with(aa,eval(parse(text=bb))) aa$z #[1]  3  7 11 aa- within(aa,z- eval(parse(text=bb))) aa #  x y  z #1 2 3  3 #2 4 5  7 #3 6 7 11 A.K. - Original Message - From: arun smartpink...@yahoo.com To: R help r-help@r-project.org

Re: [R] Confusing behaviour in data.table: unexpectedly changing variable

2013-09-25 Thread Jonathan Dushoff
Thanks for your help, and sorry for mis-posting. JD On Wed, Sep 25, 2013 at 3:18 AM, Matthew Dowle mdo...@mdowle.plus.com wrote: Very sorry to hear this bit you. If you need a copy of names before changing them by reference : oldnames - copy(names(DT)) This will be documented and

[R] Multiple vector elements into one character element

2013-09-25 Thread Lietz, Haiko
Hi all, I want to collapse multiple elements of a vector into a single comma-separated character element. I only know how to create a list of the original elements, but I have not managed to write this into a text file, which is necessary. To illustrate, let's use the airquality dataset and

[R] MaxLik estimation issues

2013-09-25 Thread Filipe Ribeiro
Hello everybody! I'm having some trouble to compute maximum likelihood estimations using maxLik package and I hope that you could give me a hint. The main problem is that I'm not able to get a result not even close to the ones given by glm() directly, and the second one is: Error in

[R] grImport problems in Windows

2013-09-25 Thread Mills, Frederick
Hello all, I'd like to use the Bioconductor motifStack function to align multiple DNA sequence motifs as PWMs (Position Weight Matrices). 1.Requires both ghostscript, and the R function grImport for converting. postscript files. - Have 64 bit GS 9.10 and R 3.01 is installed in 64 bit Windows

Re: [R] Checking a large data set for normality

2013-09-25 Thread steric
It was just a question to see if it was possible on a large data set. I wasn't looking for a flame war. New strategy is simply new strategy. Half of my time spent on R is trying to find a better way. -- View this message in context:

Re: [R] Creating a new column to a data frame using a formula from another variable

2013-09-25 Thread Bert Gunter
DO NOT DO THIS! This is a complete misuse of R. R is not a macro/scripting language that constructs language expressions to be evaluated (although it can do this). Rather, it is a functional language that uses functions that build new objects from inputted objects and parameters. I would

Re: [R] Cosine window in r

2013-09-25 Thread João Pedro Alves
x-seq(0,2*pi,by=0.01) y-cos(x) plot(x,y,type='l') On 25-09-2013 13:22, Babak Bastan wrote: Hi experts Can some one tell me, how can I implement Cosine window in r? Is there a function for that? [[alternative HTML version deleted]] __

Re: [R] Multiple vector elements into one character element

2013-09-25 Thread Bert Gunter
Perhaps ?dput -- Bert On Wed, Sep 25, 2013 at 6:10 AM, Lietz, Haiko haiko.li...@gesis.org wrote: Hi all, I want to collapse multiple elements of a vector into a single comma-separated character element. I only know how to create a list of the original elements, but I have not managed to

Re: [R] Multiple vector elements into one character element

2013-09-25 Thread arun
Hi, May be this helps: y- aggregate(Day~Month,data=x,paste,collapse=,) write.table(y,file.txt,quote=FALSE) A.K. - Original Message - From: Lietz, Haiko haiko.li...@gesis.org To: 'r-help@r-project.org' r-help@r-project.org Cc: Sent: Wednesday, September 25, 2013 9:10 AM Subject: [R]

Re: [R] Computing calculation among two vectors

2013-09-25 Thread arun
Hi, You could also try: res1-sapply(y,function(i) {x1- expand.grid(x,x);fun1- function(a,op,b){ f1- match.fun(FUN=op); f1(a,b)};fun1(x1[,1],i,x1[,2])}) row.names(res1)- row.names(res)  identical(res1,res) #[1] TRUE A.K. - Original Message - From: arun smartpink...@yahoo.com To: R help

Re: [R] Computing calculation among two vectors

2013-09-25 Thread Bert Gunter
A cute problem. Is it homework? Hint: ?outer (will provide a much simpler solution than those given below) -- Bert On Wed, Sep 25, 2013 at 8:34 AM, arun smartpink...@yahoo.com wrote: Hi, You could also try: res1-sapply(y,function(i) {x1- expand.grid(x,x);fun1- function(a,op,b){ f1-

[R] animate dataframe

2013-09-25 Thread Bart Joosen
Hi, I'm running a code which does some alignment between data. Now I want to follow the alignment while looping over the data. I'm aware of the animation package, and saw the (easy) example where a plot is animated by calling 100 times plot. Is it possible to use this trick also for printing

[R] Animate dataframe

2013-09-25 Thread Bart Joosen
Hi, sorry for the double posting, but it seems my text was gone... I'm running a code which does some alignment between data. Now I want to follow the alignment while looping over the data. I'm aware of the animation package, and saw the (easy) example where a plot is animated by calling 100

Re: [R] Computing calculation among two vectors

2013-09-25 Thread arun
I guess you meant something like: res2- sapply(y,function(i) outer(x,x,i)) row.names(res2)- row.names(res)  identical(res2,res) #[1] TRUE #or is there any shorter way? A.K. From: Bert Gunter gunter.ber...@gene.com To: arun smartpink...@yahoo.com Cc: R help

[R] error when using ps() function on categorical variables - re propensity score matching

2013-09-25 Thread Andrew Kemp
Dear List, I am having difficulty running the ps() function when variables are stored as factors and was hoping someone could provide some advice on how to proceed. I am running propensity score matching as outlined in: Greg Ridgeway, Dan McCarey, Andrew Morral, Lane Burgette and Beth

[R] drc - package

2013-09-25 Thread sahnerolle
Hi, my english is not the best, i hope its comprehensible. Can i ask here in german too? my problem: I have plottet a curve with weibull1.4. I want to define a value on the y-axis and get the value of the x-axis for the plotted curve. This is my command: library(drc)

[R] How to fix col.regions mapping in multiple spplot?

2013-09-25 Thread Rui Wang
Hello, I have a question on sp package. I drew pixel heat maps of continental U.S. using insurance litigation data. If an insurance claim is litigated at a certain location, 1 is assigned; otherwise 0 is assigned. I have assigned a value between 0 and 1 to each pixel on my map using

[R] Re: Multiple vector elements into one character element

2013-09-25 Thread Lietz, Haiko
Hi A.K., This is exactly what I needed: x - data.frame(Month = airquality$Month, Day = as.character(airquality$Day)) y - aggregate(x$Day ~ x$Month, data = x, paste, collapse = , ) write.table(y, y.txt, row.names = FALSE, quote = FALSE, sep = '\t') The trick is to use collapse in the aggregate

[R] Slight misinformation in OSX version of R

2013-09-25 Thread Erich Neuwirth
I just installed R on a Mac without any traces of earlier versions. It exhibited a well know problem: WARNING: You're using a non-UTF8 locale, therefore only ASCII characters will work. Please read R for Mac OS X FAQ (see Help) section 9 and adjust your system preferences accordingly. The

Re: [R] Best and worst values for each date

2013-09-25 Thread arun
Hi, May be you can try this: obj_name- load(arun.RData) Pred1- get(obj_name[1]) Actual1- get(obj_name[2]) library(reshape2) dat-cbind(melt(Pred1,id.vars=S1),value2=melt(Actual1,id.vars=S1)[,3])  # to reshape to long form colnames(dat)[3:4]- c(Predict,Actual) dat$variable-

[R] weighting in glmmadmb(family='nbinom') with RE

2013-09-25 Thread Trevor Davies
Hello, I was wondering if weighting has been added to glmmadmb as of yet? I found a post about a year ago that it it hadn't been implemented yet but I was hoping the documentation may just have not yet caught up. Thanks, Trevor Davies [[alternative HTML version deleted]]

Re: [R] Slight misinformation in OSX version of R

2013-09-25 Thread Ben Bolker
Erich Neuwirth erich.neuwirth at univie.ac.at writes: I just installed R on a Mac without any traces of earlier versions. It exhibited a well know problem: WARNING: You're using a non-UTF8 locale, therefore only ASCII characters will work. Please read R for Mac OS X FAQ (see Help)

Re: [R] Slight misinformation in OSX version of R

2013-09-25 Thread Prof Brian Ripley
On 25/09/2013 22:29, Ben Bolker wrote: Erich Neuwirth erich.neuwirth at univie.ac.at writes: I just installed R on a Mac without any traces of earlier versions. It exhibited a well know problem: Not 'well known' (sic) at all: most of us do not break our OS X. We don't have reproduction

Re: [R] Checking a large data set for normality

2013-09-25 Thread Rolf Turner
On 09/25/13 16:10, David Winsemius wrote: SNIP There is quite a bit of misinformation about the need for normality, some of it presented by Six Sigma experts or even by college professors who should know better. One might even say that if you don't know how to check for normality then there

Re: [R] Cosine window in r

2013-09-25 Thread Rolf Turner
I'm pretty sure that your answer has nothing to do with what the OP was asking about. OTOH it's up to the OP to make it clear what he ***is*** asking and he did not do that. cheers, Rolf Turner On 09/26/13 01:00, João Pedro Alves wrote: x-seq(0,2*pi,by=0.01) y-cos(x)

Re: [R] Best and worst values for each date

2013-09-25 Thread arun
Ira, You may try also with ?ddply() dat2- data.frame(S1=rep(Pred1[,1],ncol(Pred1)-1),variable=rep(colnames(Pred1)[-1],each=nrow(Pred1)),Predict=unlist(Pred1[,-1],use.names=FALSE),Actual=unlist(Actual1[,-1],use.names=FALSE),stringsAsFactors=FALSE)  identical(dat,dat2) #[1] TRUE dat2New-

Re: [R] Checking a large data set for normality

2013-09-25 Thread David Winsemius
On Sep 25, 2013, at 5:55 AM, steric wrote: It was just a question to see if it was possible on a large data set. I wasn't looking for a flame war. New strategy is simply new strategy. Half of my time spent on R is trying to find a better way. If you say why you want to do a global test

[R] Besag endive data

2013-09-25 Thread Marco Bee
Dear all, a few weeks ago I have seen a package containing the so called endive dataset first appeared in Besag (1978) Some Methods of Statistical Analysis for Spatial Data, Bulletin of the International Statistical Institute, 47, 77-92. Now I would need to use the dataset, but I can no

Re: [R] Missing value handling for felm function in lfe package

2013-09-25 Thread sgaure
megha patnaik wrote Dear All, I am trying to use the felm function in the lfe package. However it does not seem to deal with missing values the way the lm function does. I wish to tell it na.omit or na.action = na.omit but it does not recognize this. I need to allow for missing values as I

[R] Less than equal to symbol in ggplot2 legend text

2013-09-25 Thread mahesh samtani
Hello, I am trying to add a less than equal to symbol in a ggplot2 legend text. See sample code below. I have tried using the expression function and \u2264. I also tried adding labels to legend.text under theme. Neither of these 3 options work. Please help, Mahesh ++

Re: [R] Less than equal to symbol in ggplot2 legend text

2013-09-25 Thread Pascal Oettli
Hello, Please post in plain text, as kindly requesting by the R-help posting guide. Your code is completely messy. Regards, Pascal 2013/9/26 mahesh samtani msamt...@gmail.com Hello, I am trying to add a less than equal to symbol in a ggplot2 legend text. See sample code below. I have tried

[R] table of contents link style in R's PDF docs

2013-09-25 Thread Ben Harrison
Hello, I am mildly annoyed each time I use a PDF doc of an R package that the table of contents hyperlinks are *only* on the page numbers. To activate a hyperlink, one must carefully scan sideways from the text item wanted to the far right of the page and click on a tiny box. Multiply that

Re: [R] MaxLik estimation issues

2013-09-25 Thread Arne Henningsen
Dear Filipe On 25 September 2013 14:23, Filipe Ribeiro flipjribe...@hotmail.com wrote: Hello everybody! I'm having some trouble to compute maximum likelihood estimations using maxLik package and I hope that you could give me a hint. The main problem is that I'm not able to get a result not

[R] Importing, renaming columns and exporting mulitple csv files in R

2013-09-25 Thread Jacquomo Monk
Hi All, I have 1029 *.csv files that I would like read individually into R, delete some columns and rename others, and then export individually using the original file names. I have written some script to do this for an individual file (script below), but cannot get it to loop through all the

Re: [R] Importing, renaming columns and exporting mulitple csv files in R

2013-09-25 Thread arun
Hi, Try: If the files are all in the same working directory, #for example list.files() # 3 files in my WD #[1] file1.csv file2.csv file3.csv  lapply(list.files(),function(x) {names1-read.csv(x,header=TRUE); names(names1)[c(19,23)]- c(Redundant,Reef % cover); dat1-

Re: [R] Importing, renaming columns and exporting mulitple csv files in R

2013-09-25 Thread Jacquomo Monk
A.K. Thanks for the reply. Will give it a try... Jac -- View this message in context: http://r.789695.n4.nabble.com/Importing-renaming-columns-and-exporting-mulitple-csv-files-in-R-tp4676951p4676959.html Sent from the R help mailing list archive at Nabble.com.