Re: [R] Labeling Stacked Bar Plots Representing Percentages with Count Data

2019-11-17 Thread Rui Barradas
Hello, It's dificult to tell without data. Can you post the output of dput(head(tagSummary, 20)) # or 30 ? (If it's private data, something mimicking its structure.) Rui Barradas Às 02:06 de 18/11/19, Josh B escreveu: Hello Rui, I worked through your suggestion and appear to be getting an

Re: [R] How to import and create time series data frames in an efficient way?

2019-11-17 Thread Jeff Newmiller
The pattern argument is supposed to be a regular expression, not a file globbing expression, so "." matches anything, and "*" is not supposed to be the first character of the search string (read ?regex). Also, I think you forgot to indicate where the ldply function came from.. the plyr

Re: [R] How to import and create time series data frames in an efficient way?

2019-11-17 Thread Nhan La
Thanks Bert. I also managed to get this work files = list.files(pattern="*.txt") df = ldply(files, read_csv,col_names=c("ticker","date","open","high", "low", "close", "volume")) Cheers, Nathan On Fri, Nov 15, 2019 at 3:45 PM Bert Gunter wrote: > Ha! -- A bug! "Corrected" version inline below:

Re: [R] Supplying names to vars() in ggplot2.

2019-11-17 Thread Rolf Turner
On 18/11/19 2:28 AM, Hadley Wickham wrote: See this new vignette in dev ggplot2: https://ggplot2.tidyverse.org/dev/articles/ggplot2-in-packages.html Hadley Yes! Thank you. Bottom line: for what I want to do the syntax is

Re: [R] Can't get facet_grid_paginate() from ggforce to work.

2019-11-17 Thread Rolf Turner
Yep. That worked. Thanks very much Rui. cheers, Rolf On 18/11/19 2:12 AM, Rui Barradas wrote: Hello, Sorry, copy did a poor job. The right code now. library(ggforce) X <- dget("testData.txt") nrows <- length(levels(X$Species)) ncols <- length(levels(X$LifeStage)) npages <-

Re: [R] Adaptive resampling in r

2019-11-17 Thread David Winsemius
This doesn't appear to be a question about R coding. Please review the Posting Guide. -- David. On 11/15/19 2:59 PM, Neha gupta wrote: How the hyperparameter settings via adaptive resampling is different from the one obtained from grid search or random search? Both grid and random searches

[R] Glmnet R - can't modify fdev parameter when lower = 0

2019-11-17 Thread Pierre Maho
Hi, I want to solve the following optimisation problem: [image: \hat{\beta} = \arg \min_{\beta \geq 0} \| y-A\beta \|_2^2 + \lambda \|\beta\|_1] For that, I am using glmnet package (cv.glmnet for finding 휆 and lower.limits = 0 to impose non-negativity). I would like to modify the fdev

Re: [R] How to save google map in r ?

2019-11-17 Thread Rui Barradas
Hello, See the docs: get_amp returns a ggmap object and ggmap returns a ggplot object. So ggsave() should do what you want. Hope this helps, Rui Barradas Às 09:48 de 17/11/19, Kristi Glover escreveu: Hi R users, I am struggling to save the map with georeferenced (TIFF) that was imported

Re: [R] How to save google map in r ?

2019-11-17 Thread Bert Gunter
Please use search facilities before posting such questions here. I searched on "How to save google map in R" at rseek.org and got many relevant hits. If you have *already* done this, you should tell us why what you got did not suffice. Cheers, Bert Bert Gunter "The trouble with having an

Re: [R] Supplying names to vars() in ggplot2.

2019-11-17 Thread Hadley Wickham
See this new vignette in dev ggplot2: https://ggplot2.tidyverse.org/dev/articles/ggplot2-in-packages.html Hadley On Saturday, November 16, 2019, Rolf Turner wrote: > > I need to call ggplot() from another function with the names of the > faceting variables supplied as arguments to the calling

Re: [R] Can't get facet_grid_paginate() from ggforce to work.

2019-11-17 Thread Rui Barradas
Hello, Sorry, copy did a poor job. The right code now. library(ggforce) X <- dget("testData.txt") nrows <- length(levels(X$Species)) ncols <- length(levels(X$LifeStage)) npages <- length(levels(X$degC)) plotObj <- vector("list", npages) pdf(file = 'Rhelp_test.pdf') for(page in 1:npages) {

Re: [R] Can't get facet_grid_paginate() from ggforce to work.

2019-11-17 Thread Rui Barradas
Hello, I don't know why but use an explicit nrow = nrows with 'nrows' defined as nrows <- length(levels(X$Species)) It seems to work (remove the device pdf() code if it's more annoying than useful): nrows <- length(levels(X$Species)) ncols <- length(levels(X$LifeStage)) npages <-

[R] How to save google map in r ?

2019-11-17 Thread Kristi Glover
Hi R users, I am struggling to save the map with georeferenced (TIFF) that was imported from google map. I would be very grateful with your input. How can I save this image and reuse it when I need? I used the following code library(ggmap) library(mapproj) map <- get_map(location = 'Europe',