Re: [R] Unable to take correct Web-snapshot

2018-06-01 Thread Ista Zahn
The documentation is at https://developers.coinbase.com/api/v2. You can make GET requests in R using the httr packge. --Ista On Fri, Jun 1, 2018 at 11:12 AM, Christofer Bogaso wrote: > Thanks for that information. > > However how can I use R to directly get data from that API? > > On Fri, Jun 1,

Re: [R] Cannot Load A Package

2018-06-01 Thread Duncan Murdoch
On 01/06/2018 5:24 PM, Shivi Bhatia wrote: Hi All, I am trying to download semnet package but getting the error: package not available for R version 3.4.4. As far as I can see, there is no semnet package on CRAN, and never has been (or if there was, it was there by mistake). Packages whose

[R] Cannot Load A Package

2018-06-01 Thread Shivi Bhatia
Hi All, I am trying to download semnet package but getting the error: package not available for R version 3.4.4. I tried downloading it from install.packages('semnet',repos='http://cran.us.r-project.org') and install.packages('semnet',repos='http://cran.revolutionanalytics.com/') and even the htt

Re: [R] values of list of variable names

2018-06-01 Thread Greg Minshall
Christian, does this do it? > eval(lapply(ls(pattern="pr"), function(x) eval(parse(text=x cheers, Greg __ 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 gui

Re: [R] Time-series moving average question

2018-06-01 Thread MacQueen, Don via R-help
For your first question, you’re doing moving averages of 3 points (I assume that’s what order=3 does). For any given time point of your input data, that would be one before, one at, and one after the given time point. Do all of your input times have both one before and one after? Don’t know ab

Re: [R] rasterize SpatialPolygon object using a RasterBrick object

2018-06-01 Thread Michael Sumner
I see this problem in 2.6-7 (version on CRAN) but it's now fixed in dev on RForge, you can try it out by installing from there, or from the Github mirror with devtools::install_github("rforge/raster/pkg/raster"). There's an imminent release to CRAN some time soon. Cheers, Mike. On Sat, 2 Jun 20

Re: [R] values of list of variable names

2018-06-01 Thread jim holtman
You probably want to use 'get': > r1 <- 5 > r2 <- 3 > r3 <- 45 > x <- ls(pattern = '^r.$') > x [1] "r1" "r2" "r3" > lapply(x, get) [[1]] [1] 5 [[2]] [1] 3 [[3]] [1] 45 > Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you wa

Re: [R] Regroup and create new dataframe

2018-06-01 Thread David L Carlson
No html!, Copy the list using Reply-All. The data frame group_PrivateLabel does not contain variables called Product_Name or Region. David C From: nguy2952 University of Minnesota Sent: Friday, June 1, 2018 2:13 PM To: David L Carlson Subject: Re: [R] Regroup and create new dataframe Hi Da

Re: [R] Regroup and create new dataframe

2018-06-01 Thread David L Carlson
Responses should be copied to r-help using ReplyAll. You are still sending html formatted emails. If you are using Microsoft Outlook, click the Format Text tab and select “Aa Plain Text”. No one has asked you to reveal the data set, only to create one with a similar structure. Is the data I sent

Re: [R] Regroup and create new dataframe

2018-06-01 Thread Rui Barradas
Hello, I don't understand why you are splitting data1 and then unlisting the result. if you want to apply a modeling function to each of the subdf's, split by Product name, you can follow more or less these steps: 0. Create a dataset set.seed(9376)    # Make the results reproducible n <-

Re: [R] Regroup and create new dataframe

2018-06-01 Thread David L Carlson
Your question raises several issues. First, we do not do homework here, so if this is an assignment, you will not get much help. Second, you need to send your emails as plain text, not html. Third, you need to provide a reproducible example and send your data using dput() so that we can follow w

[R] rasterize SpatialPolygon object using a RasterBrick object

2018-06-01 Thread Dimitri Szerman
I am trying to rasterize a SpatialPolygon object by a RasterBrick object. The documentation of the raster::rasterize function explicitly says this is allowed. Here's what I am doing # load the raster package library("raster") # create a raster brick object using the example from the brick function

Re: [R] values of list of variable names

2018-06-01 Thread William Dunlap via R-help
One way is values <- lapply(lis, get) You can do names(values) <- lis to attach the object names to the values in the list returned by lapply. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Jun 1, 2018 at 7:25 AM, Christian wrote: > Hi, > > I have searched the documentations of eva

Re: [R] Time-series moving average question

2018-06-01 Thread Bill Poling
Hi Don, wow, you are so right. I picked that piece up from the bloggers tutorial and since I am R naive yet, I thought it was all one step moving_average = forecast(ma(tdat[1:31], order=2), h=5) Truly, I usually print and check at every step I can, as painful as it is sometimes. Great lesson fo

[R] Regroup and create new dataframe

2018-06-01 Thread nguy2952 University of Minnesota
Hello folks, I have a big project to work on and the dataset is classified so I am just going to use my own example so everyone can understand what I am targeting. Let's take Target as an example: We consider three brands of tape: Target brand, 3M and Avery. The original data frame has 4 columns:

[R] values of list of variable names

2018-06-01 Thread Christian
Hi, I have searched the documentations of eval, substitute, expression, and I cannot make work something like the values of a list of variable names: lis <- ls(pattern="pr") # all variables with names containing 'pr' What is the mantra giving me the _values_ of the variables whose names are

Re: [R] Time-series moving average question

2018-06-01 Thread MacQueen, Don via R-help
You are right that there are no NAs in the practice data. But there are NAs in the moving average data. To see this, break your work into two separate steps, like this: tnr.ma <- ma(dat3[1:28], order=3) TNR_moving_average <- forecast(tnr.ma, h=8) I think you will find that the warning comes

Re: [R] Time-series moving average question

2018-06-01 Thread Bill Poling
Hello Don, thank you for your response. I appreciate your help. I am using the forecast package, originally I found it following a forecasting example on bloggers.com https://www.r-bloggers.com/time-series-analysis-using-r-forecast-package/ And subsequently located the complete pdf https://cra

Re: [R] Time-series moving average question

2018-06-01 Thread MacQueen, Don via R-help
My guess would be that if you inspect the output from ma(dat3[1:28], order=3) you will find some NAs in it. And then forecast() doesn't like NAs. But I can't check, because I can't find the ma() and forecast() functions. I assume they come from some package you installed; it would be helpful

Re: [R] Unable to take correct Web-snapshot

2018-06-01 Thread Christofer Bogaso
Thanks for that information. However how can I use R to directly get data from that API? On Fri, Jun 1, 2018 at 8:36 PM Martin Møller Skarbiniks Pedersen < traxpla...@gmail.com> wrote: > On 1 June 2018 at 15:08, Christofer Bogaso > wrote: > > Hi again, > > > > I use the *webshot* package to tak

Re: [R] Unable to take correct Web-snapshot

2018-06-01 Thread Martin Møller Skarbiniks Pedersen
On 1 June 2018 at 15:08, Christofer Bogaso wrote: > Hi again, > > I use the *webshot* package to take snapshot from Webpage. However, when I > try to take snapshot from* https://www.coinbase.com/ > *, this fails to take the full snapshot of that > page. Yes, that is a g

[R] Unable to take correct Web-snapshot

2018-06-01 Thread Christofer Bogaso
Hi again, I use the *webshot* package to take snapshot from Webpage. However, when I try to take snapshot from* https://www.coinbase.com/ *, this fails to take the full snapshot of that page. I tried following : > library(webshot) > webshot("https://www.coinbase.com/";

Re: [R] Problem with adding a raster and a brick

2018-06-01 Thread Michael Sumner
This is now fixed in development on RForge, you can try it out by installing from there, or from the Github mirror with devtools::install_github("rforge/raster/pkg/raster"). (To get fixes into raster email the maintainer directly - you might not get a response but it'll be addressed). Cheers, Mik

[R] Last page on a multi page, faceted graph created using ggforce, loses its layout under a certain condition

2018-06-01 Thread Ashim Kapoor
Dear All, I posted this query on stack overflow but I received no replies so I am posting it here so that someone here can take a look at this. My query is that suppose the variable I am faceting by has 40 categories and I want 3 categories per page( 1 row x 3 columns),then the last category fill

[R] Time-series moving average question

2018-06-01 Thread Bill Poling
Good morning, I hope someone can help with these questions, or perhaps suggest one of the other R-lists? I have two questions: 1. Why am I getting this warning? 2. Why is the second example "Point Forecast" the same value, I do not see that in previous attempts with similar but different