Re: [R] Plots without X11 in CentOS

2015-04-24 Thread Sudip Chatterjee
Hi Peter, I did the same but I received an error stating X11 is not available. On Fri, Apr 24, 2015 at 8:11 PM, peter dalgaard wrote: > Plot directly to the appropriate device, e.g. > > pdf(file="my.pdf") > plot(rnorm(500)) > dev.off() > > This is often recommendable even if you do have an on-

Re: [R] Interactive maps

2015-04-24 Thread Jim Lemon
Hi Antonio, If you do create the map in R, you can use locator(). Jim On Sat, Apr 25, 2015 at 8:37 AM, Antonio Serrano via R-help wrote: > > Hello, all: > >I am new here, and have a challenge to present some graphical data to the > user in a convenient way. > >The challenge is to pres

Re: [R] Why is removeSparseTerms() not doing anything?

2015-04-24 Thread John Kane
Reproducibility http://adv-r.had.co.nz/Reproducibility.html http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example John Kane Kingston ON Canada > -Original Message- > From: mikeh...@y7mail.com > Sent: Wed, 22 Apr 2015 18:52:45 + (UTC) > To: r-help@

[R] Interactive maps

2015-04-24 Thread Antonio Serrano via R-help
Hello, all: I am new here, and have a challenge to present some graphical data to the user in a convenient way. The challenge is to present a map to the user which is coloured with the value of a variable. Say for example, temperature. This is a preexisting graph that I can generate in

[R] obtaining the sum of lagged variables

2015-04-24 Thread T.Riedle
Hi everybody, I am trying to replicate the formula shown in the attachment. I want to estimate tau using a macroeconomic variable X at month t using k lags of the variable X. My code so far looks as follows: psi <- fn(...) k <- 1:K ltau <- m + theta*sum(psi*X[t-k]) Unfortunately, if I run the c

Re: [R] Extract latitude and longitude from several geottaged jpeg files

2015-04-24 Thread Michael Sumner
Geospatial image maps or just exif tags? Search for "r exif" for several leads. Cheers, Mike On Sat, Apr 25, 2015, 08:48 Alejo C.S. wrote: > Hi all, I have several jpeg files with lat long information. I want to make > a lat long table whit this info. Anyone knows how to do it? Can't find > an

Re: [R] Extract latitude and longitude from several geottaged jpeg files

2015-04-24 Thread MacQueen, Don
That's a pretty vague question, but you might be able to do it with functions from the raster package. Followup on this topic should be to R-sig-geo. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 4/24/15, 3:46 PM, "Al

[R] Extract latitude and longitude from several geottaged jpeg files

2015-04-24 Thread Alejo C.S.
Hi all, I have several jpeg files with lat long information. I want to make a lat long table whit this info. Anyone knows how to do it? Can't find anything in google. Thanks a lot in advance A. [[alternative HTML version deleted]] __ R-help@r-

[R] JPEG command not responding to size options

2015-04-24 Thread Fisher Dennis
R 3.2.0 OS X Colleagues I have a script that has been unchanged for years but I just noticed a difference in the output. A minimal example is: jpeg(file="xxx.jpeg", width=4, height=2, unit="in", pointsize=12, bg="white", res=150, quality=100) plot(1) graphics.off()

Re: [R] help

2015-04-24 Thread John Kane
Bonjour, We need more information. See Reproducibility http://adv-r.had.co.nz/Reproducibility.html for some suggestions on how to ask a question. John Kane Kingston ON Canada > -Original Message- > From: mamadouns...@gmail.com > Sent: Fri, 24 Apr 2015 13:26:32 +0100 > To: r-help@r

Re: [R] run Rscript and ignore errors?

2015-04-24 Thread Nick Matzke
Hi, Thanks so much for the hints, I think I've cracked it! The key is to create a dummy function, "continue_on_error" which gets run instead of "stop" when an error occurs, then reference it with options(error=continue_on_error). Here's an example: == continue_on_error

Re: [R] help

2015-04-24 Thread François Morneau
Hello, Please, read and follow the posting guide and provide a minimal reproducible example as you are encouraged to do. Moreover, write to the list in english. Just a quick test : have you looked at your object 'mat_tp' : > str(mat_tp) Bon courage, François Le 24/04/2015 14:26, Mamadou Ndia

Re: [R] lm() funtion

2015-04-24 Thread Bert Gunter
You really really really need to work with a local statistical expert, as your post indicates fundamental confusion. Furthermore, statistical issues are off topic here. Cheers, Bert On Friday, April 24, 2015, Praveen kr singh wrote: > Hi, > > Currently i am working with the lm() function for so

Re: [R] Plots without X11 in CentOS

2015-04-24 Thread peter dalgaard
Plot directly to the appropriate device, e.g. pdf(file="my.pdf") plot(rnorm(500)) dev.off() This is often recommendable even if you do have an on-screen graphics device because some subtleties can get lost in translation for one device to another. (The prototypical example is that a legend box

Re: [R] lm() funtion

2015-04-24 Thread Suzen, Mehmet
try lm.ridge from MASS package. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

[R] Plots without X11 in CentOS

2015-04-24 Thread Sudip Chatterjee
Hi All, I am wondering how to save plots in R at CentOS when X11 is not available, any suggestion would be appreciated. Warm Regards Sudip [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] some general advice sought on the use of gctorture()

2015-04-24 Thread Jeff Newmiller
This is very off-topic here. My suggestion would be to do as the Posting Guide says and ask this on R-devel, or perhaps even a gdb forum. From what little I know, valgrind might help also. --- Jeff Newmiller

Re: [R] run Rscript and ignore errors?

2015-04-24 Thread Jue Lin-Ye
Jeff Newmiller dcn.davis.ca.us> writes: > > This seems like a recipe for garbage results to me, but there may be I something you can set the error option > to. See ?options. > --- > Jeff NewmillerThe

Re: [R] some general advice sought on the use of gctorture()

2015-04-24 Thread Martin Morgan
On 04/24/2015 06:49 AM, Franckx Laurent wrote: Dear all I have bumped into the dreaded 'segfault' error type when running some C++ code using .Call(). segfaults often involve invalid memory access at the C level that are best discovered via valgrind or similar rather than gctorture. A good wa

[R] lm() funtion

2015-04-24 Thread Praveen kr singh
Hi, Currently i am working with the lm() function for some regressions required for my project. suppose the formula parameter in that is given by "response ~ terms",after some testing i found out that when the number of observations under terms is less than the number of columns or features un

[R] help

2015-04-24 Thread Mamadou Ndiaye SENE
Bonjour, je suis un nouveau dans R. Je fais actuellement mon mémoire de mastère et je voudrais appliquer le Package BCDating. Mail il se trouve que je reçois toujours le message d'erreur suivant: Erreur dans if (mat_tp[r, 1] < n) mat_tp <- rbind(mat_tp, c(n, 1 - mat_tp[r, : l'argument est de lon

Re: [R] Possible bug in rlm

2015-04-24 Thread Richard Perry
Have just checked with R 3.2.0 and MASS 7.3-40 and there still appears to be a problem/strangeness at around k=2.5 On 23 April 2015 at 14:09, Francis Bursa wrote: > Dear all, > > I believe I have found a bug in rlm in the MASS package. Specifically, the > scale estimate can be wrong when there

Re: [R] cbind question, please

2015-04-24 Thread David Kienle
Hello Erin, I think you have explain your goal more detailed. Maybe I am completely lost but as far as I understand now you only need the command cbind: m1 <- cbind(dog, dat, tree) dog cat tree [1,] 1 25 [2,] 2 36 [3,] 3 47 But I can't imagine that is the solution yo

[R] Error increasing font size in R 3.2.0

2015-04-24 Thread Chris Battiston
I wanted to increase the size of the font in R, but when I do, I get the error message below. I've searched on Google, and the only thing I saw is about changing the version of X11. I'm running the current version of X11, and running OS X Yosemite 10.10.3. I'm using a Mac Desktop, 3.2 Ghz pro

[R] some general advice sought on the use of gctorture()

2015-04-24 Thread Franckx Laurent
Dear all I have bumped into the dreaded 'segfault' error type when running some C++ code using .Call(). I have already undertaken several attempts to debug the C++ code with gdb(), but until now I have been unable to pinpoint the origin of the problem. There are two elements that I think are p

Re: [R] cbind question, please

2015-04-24 Thread William Dunlap
You could do something tricky like > do.call(cbind, lapply(big.char, as.name)) dog cat tree [1,] 1 25 [2,] 2 36 [3,] 3 47 but you are usually better off creating these things as part of a list and passing that to do.call(cbind, list). There is a slight danger

Re: [R] Mean of dates

2015-04-24 Thread Jue Lin-Ye
On 24 April 2015 at 12:59, Achim Zeileis wrote: > > > On Fri, 24 Apr 2015, Jue Lin-Ye wrote: > > Dear fellow R-help members, >> >> If my data is >> >> MM DD HH >> 2015 04 24 01 >> 2015 04 24 02 >> 2015 04 24 06 >> >> Where >> >> : year >> MM:month >> DD:day >> HH: hour >> >> How could I

Re: [R] - Obtaining superscripts to affix to means that are not significantly different from each other with R

2015-04-24 Thread Jim Lemon
Hi Joachim, This function allows the user to set some characters in a string to superscript or subscript. If sup or sub are set to one or more numbers corresponding to an index in the string, those letters will be placed appropriately. I can't properly test this as there is some problem with X11 fo

Re: [R] Mean of dates

2015-04-24 Thread Achim Zeileis
On Fri, 24 Apr 2015, Jue Lin-Ye wrote: Dear fellow R-help members, If my data is MM DD HH 2015 04 24 01 2015 04 24 02 2015 04 24 06 Where : year MM:month DD:day HH: hour How could I calculate the mean of the ISOdatetime(,MM,DD,HH,0,0) of these? With the mean() method? On my

[R] Mean of dates

2015-04-24 Thread Jue Lin-Ye
Dear fellow R-help members, If my data is MM DD HH 2015 04 24 01 2015 04 24 02 2015 04 24 06 Where : year MM:month DD:day HH: hour How could I calculate the mean of the ISOdatetime(,MM,DD,HH,0,0) of these? Note: I set minutes and seconds to 0, as I don't have data for them. ​Tha

Re: [R] cbind question, please

2015-04-24 Thread Rolf Turner
I am amazed at the number of rather obtuse misunderstandings of the actual nature of Erin's question. The suggestion that Erin should read the intro to R made me smile. Erin is a long time and highly sophisticated user of R; she has no need to read the intro. The person who made that sugge

Re: [R] cbind question, please

2015-04-24 Thread Martin Maechler
> Steve Taylor > on Thu, 23 Apr 2015 23:32:00 + writes: > This works for me... > get0 = function(x) get(x,pos=1) > sapply(big.char, get0) Note that get0() is a _ somewhat important for efficient code _ new function since R 3.2.0 so you'd rather call your functions di

Re: [R] cbind question, please

2015-04-24 Thread Berwin A Turlach
G'day Erin, On Thu, 23 Apr 2015 20:51:18 -0400 Erin Hodgess wrote: > Here is the big picture. I have a character vector with all of the > names of the variables in it. > > I want to "cbind" all of the variables to create a matrix. > > Doing 3 is straightforward, but many, not so much. So I g

Re: [R] R MSI Installer

2015-04-24 Thread Prof Brian Ripley
On 24/04/2015 01:22, billy am wrote: Hi Everyone , Is there a place where I can download msi installer for latest version of R? I believe not: certainly not an official one. Consult the manual as to how to build one if you really need one. Thanks Billy [[alternative HTML version

Re: [R] cbind question, please

2015-04-24 Thread Michael Hannon
Is this what you're looking for? > dog <- 1:3 > bat <- 2:4 > tree <- 5:7 > big.char <- c("dog","bat","tree") > do.call(cbind,lapply(big.char, get)) [,1] [,2] [,3] [1,]125 [2,]236 [3,]347 > On Thu, Apr 23, 2015 at 3:41 PM, Erin Hodgess wrote: > Hello!

Re: [R] cbind question, please

2015-04-24 Thread Kehl Dániel
Hello, I am not sure what you mean by a matrix. If you want to have a matrix, use the function matrix, (matrix(c(dog,cat,tree),3)) but I have the feeling you really want a data frame as you are talking about variables. In that case simply use mydataframe <- data.frame(dog,cat,tree) If you are

Re: [R] Need content_transformer() called by tm_map() to change non-letters to spaces

2015-04-24 Thread Jeff Newmiller
Regex "[^a-zA-Z]" reads as "not a letter". --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. D

Re: [R] run Rscript and ignore errors?

2015-04-24 Thread Jeff Newmiller
This seems like a recipe for garbage results to me, but there may be I something you can set the error option to. See ?options. --- Jeff NewmillerThe . . Go Live... DCN:Basics

Re: [R] cbind question, please

2015-04-24 Thread Rolf Turner
On 24/04/15 10:41, Erin Hodgess wrote: Hello! I have a cbind type question, please: Suppose I have the following: dog <- 1:3 cat <- 2:4 tree <- 5:7 and a character vector big.char <- c("dog","cat","tree") I want to end up with a matrix that is a "cbind" of dog, cat, and tree. This is a toy e

[R] R MSI Installer

2015-04-24 Thread billy am
Hi Everyone , Is there a place where I can download msi installer for latest version of R? Thanks Billy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/list

Re: [R] cbind question, please

2015-04-24 Thread John Kane
What are you expecting? dog <- 1:3 cat <- 2:4 tree <- 5:7 big.char <- c("dog","cat","tree") xx <- cbind(dog, cat, tree, big.char) gives me xx1 <- structure(c("1", "2", "3", "2", "3", "4", "5", "6", "7", "dog", "cat", "tree"), .Dim = 3:4, .Dimnames = list(NULL, c("dog", "cat", "tree", "big.

Re: [R] Warning message when starting RStudio

2015-04-24 Thread Sun Shine
On 23/04/15 13:41, Albin Blaschka wrote: Hello Am 23.04.2015 um 09:57 schrieb Berend Hasselman: On 23-04-2015, at 08:45, Sun Shine wrote: Hi list Recently, when starting up RStudio, the following warning is being displayed: "Error in tools:::httpdPort <= 0L : comparison (4) is possible

Re: [R] cbind question, please

2015-04-24 Thread Erin Hodgess
Here is the big picture. I have a character vector with all of the names of the variables in it. I want to "cbind" all of the variables to create a matrix. Doing 3 is straightforward, but many, not so much. Hence my question. Thanks so much for your answers! Sincerely, Erin On Thu, Apr 23,

Re: [R] cbind question, please

2015-04-24 Thread Marc Schwartz
On Apr 23, 2015, at 5:41 PM, Erin Hodgess wrote: > > Hello! > > I have a cbind type question, please: Suppose I have the following: > > dog <- 1:3 > cat <- 2:4 > tree <- 5:7 > > and a character vector > big.char <- c("dog","cat","tree") > > I want to end up with a matrix that is a "cbind" of

Re: [R] cbind question, please

2015-04-24 Thread Steve Taylor
This works for me... get0 = function(x) get(x,pos=1) sapply(big.char, get0) The extra step seems necessary because without it, get() gets base::cat() instead of cat. cheers, Steve -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erin Hodgess Sent:

Re: [R] cbind question, please

2015-04-24 Thread Erin Hodgess
These are great! Thank you! On Thu, Apr 23, 2015 at 7:14 PM, William Dunlap wrote: > You could do something tricky like > > do.call(cbind, lapply(big.char, as.name)) >dog cat tree > [1,] 1 25 > [2,] 2 36 > [3,] 3 47 > but you are usually better off creat

Re: [R] cbind question, please

2015-04-24 Thread Clint Bowman
Perhaps: dog <- 1:3 cat <- 2:4 tree <- 5:7 big.char <- cbind(dog,cat,tree) big.char dog cat tree [1,] 1 25 [2,] 2 36 [3,] 3 47 colnames(big.char)<-c("dog","cat","tree") big.char dog cat tree [1,] 1 25 [2,] 2 36 [3,] 3 47 Clint Bowma

Re: [R] cbind question, please

2015-04-24 Thread Jim Lemon
Hi Erin, Well, if I do this: dog <- 1:3 cat <- 2:4 tree <- 5:7 dct<-cbind(dog,cat,tree) I get this: dct dog cat tree [1,] 1 25 [2,] 2 36 [3,] 3 47 If I assume that you want to include the character vector as well: rownames(dct)<-big.char dct Jim On Fri, Apr 24, 2