[R] R / G GUI freezes saving plot

2016-03-18 Thread Daniel Preciado
Randomly, whenever I try to save a plot, R becomes unresponsive and has to be killed. This happens almost every time. R version 3.2.4 (2016-03-10) -- "Very Secure Dishes” Platform: x86_64-apple-darwin13.4.0 (64-bit) R.app GUI 1.67 (7152) x86_64-apple-darwin13.4.0 Os el capitan 10.11.3 (Although

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-18 Thread Barry Rowlingson
You *might* be able to get them from the raw file... First, I don't quite know what "colnames" of an .RData file means. "colnames" are the column names of a matrix (or data frame), so I'll assume your .RData file contains exactly one data frame and you want to column names of it. So let's create

[R] R count.points thinks projections are different

2016-03-18 Thread Rebecca Wooldridge [bs13rw]
I am currently working with telemetry data for some cats: x<-read.csv("CCATS.csv") obs2<-x[c("ID", "X", "Y")] dat_df <- obs2 %>% dplyr::select(ID) %>% as.data.frame() p4s <- "+proj=utm +zone=16 +ellps=clrk66 +datum=NAD27 +units=m +no_defs" p4s_crs <- CRS(p4s) xy <- obs2 %>% dplyr::select(X, Y)

[R] Plot help

2016-03-18 Thread André Luis Neves
Dear all: I was wondering how I modify the plot command below so that the y-axis displays the numbers in a 4 by 4 scale. It looks like the plot generated by the commands below shows the y-axis in a 5 by 5 scale: Values <- c(1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, 16) Values Log <- log2(Values)

Re: [R] plot numeric vs character

2016-03-18 Thread Duncan Mackay
I haven't been following the thread but! If you want to use lattice xyplot # create x values in their right position -- # assuming equal spacing mydf$x = rep(1:3, each = 3) library(lattice) xyplot(num ~ x, mydf, scales = list(x = list(at = 1:3, label = letters[1:3])),

Re: [R] How to reach the column names in a huge .RData file without loading it

2016-03-18 Thread Boris Steipe
However: if you need to repeat the process, as you wrote, you could store the column names in a separate object for future access after your first read. B. On Mar 16, 2016, at 12:59 PM, Lida Zeighami wrote: > Thank you Bert and Frederic. > > On Wed, Mar 16, 2016 at 11:52

[R] [R-pkgs] gpuR 1.1.0 Release

2016-03-18 Thread Charles Determan
Dear R users, The next release of gpuR (1.1.0) has been accepted to CRAN ( http://cran.r-project.org/package=gpuR). There have been multiple additions including: 1. Scalar operations for gpuMatrix/vclMatrix objects (e.g. 2 * X) 2. Unary '-' operator added (e.g. -X) 3. 'slice' and 'block'

Re: [R] R / G GUI freezes saving plot

2016-03-18 Thread Daniel Preciado
No, nothing particular at all I would say. I generate plots either with functions from base R (such as plot() ) or ggplot2. Plotting functions are fine, so long as I don’t try to save them…. I also noted that the issue is most frequent when I save the plots from the menu (File>Save as) than if

Re: [R] plot numeric vs character

2016-03-18 Thread PIKAL Petr
Hi I am not an expert but it probably results from covenience plot.factor method which calls boxplot when used for or factor data. See graphics:::plot.factor graphics:::boxplot.default I belive that you can do something with ggplot like (untested) p <-ggplot(mydf, aes(x=let, y=num))

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Bert Gunter
arrays are vectors stored in column major order. So the answer is: reindexing. Does this make it clear: > v <- array(1:24,dim=2:4) > as.vector(v) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 > v , , 1 [,1] [,2] [,3] [1,]135 [2,]246

Re: [R] Warning message: Computation failed in `stat_bin()`: attempt to apply non-function

2016-03-18 Thread John Kane
> ggplot(x=aes(friend_count), data=pf) + geom_histogram() The x= in the above statement is wrong ggplot(aes(friend_count), data=pf) + geom_histogram() will work but it looks funny. The more common way to write the command would likely be: ggplot(pf, aes(friend_count)) + geom_histogram() The

Re: [R] What "method" does sort() use?

2016-03-18 Thread peter dalgaard
On 18 Mar 2016, at 10:02 , Patrick Connolly wrote: > I don't follow why this happens: > >> sort(c(LETTERS[1:5], letters[1:5])) > [1] "a" "A" "b" "B" "c" "C" "d" "D" "e" "E" > > The help for sort() says: > > method: character string specifying the algorithm used.

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Roy Mendelssohn - NOAA Federal
Hi Henrik: I want to do want in oceanography is called an EOF, which is just a PCA analysis. Unless I am missing something, in R I need to flatten my 3-D matrix into a 2-D data matrix. I can fit the entire 30GB matrix into memory, and I believe I have enough memory to do the PCA by

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Roy Mendelssohn - NOAA Federal
> On Mar 18, 2016, at 2:56 PM, Bert Gunter wrote: > > However copying may occur anyway as part of R's semantics. Others will > have to help you on that, as the details here are beyond me. > > Cheers, > Bert Hi Bert: Thanks for your response. The only part I was

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Roy Mendelssohn - NOAA Federal
Thanks. That is what I needed to know. I don’t want to play around with some of the other suggestions, as I don’t totally understand what they do, and don’t want to risk messing up something and not be aware of it. There is a way to read in the data chunks at a time and reshape it and put, it

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Henrik Bengtsson
On Fri, Mar 18, 2016 at 3:15 PM, Roy Mendelssohn - NOAA Federal wrote: > Thanks. That is what I needed to know. I don’t want to play around with > some of the other suggestions, as I don’t totally understand what they do, > and don’t want to risk messing up something

Re: [R] Reshaping an array - how does it work in R

2016-03-18 Thread Jeff Newmiller
R always makes a copy for this kind of operation. There are some operations that don't make copies, but I don't think this one qualifies. -- Sent from my phone. Please excuse my brevity. On March 18, 2016 2:28:35 PM PDT, Roy Mendelssohn - NOAA Federal wrote: >Hi