similar to: How to programmatically save a web-page using R (mimicking Command+S)

Displaying 20 results from an estimated 4000 matches similar to: "How to programmatically save a web-page using R (mimicking Command+S)"

2018 Jan 06
0
How to programmatically save a web-page using R (mimicking Command+S)
The 'webshot' package (on CRAN) can do this. Henrik On Jan 6, 2018 05:27, "Christofer Bogaso" <bogaso.christofer at gmail.com> wrote: > Hi, > > I would appreciate if someone can give me a pointer on how to save a > webpage programmatically using R. > > For example, let say I have this webpage open in my browser: > >
2018 Jun 01
2
Unable to take correct Web-snapshot
Hi again, I use the *webshot* package to take snapshot from Webpage. However, when I try to take snapshot from* https://www.coinbase.com/ <https://www.coinbase.com/>*, this fails to take the full snapshot of that page. I tried following : > library(webshot) > webshot("https://www.coinbase.com/", 'aa.pdf') However in the pdf page, I done see the quotes which are
2018 Jun 01
1
Unable to take correct Web-snapshot
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 < traxplayer at gmail.com> wrote: > On 1 June 2018 at 15:08, Christofer Bogaso <bogaso.christofer at gmail.com> > wrote: > > Hi again, > > > > I use the *webshot* package to take snapshot from Webpage.
2018 Jun 01
0
Unable to take correct Web-snapshot
On 1 June 2018 at 15:08, Christofer Bogaso <bogaso.christofer at gmail.com> 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/ > <https://www.coinbase.com/>*, this fails to take the full snapshot of that > page. Yes, that is a general problem with many webshot
2017 Jul 18
4
Creating/Reading a complex string in R
Thanks for your pointer. Is there any way in R how to replace " ' " with " /' " programmatically? My actual string is quite lengthy, so changing it manually may not be possible. I am aware of gsub() function, however not sure I can apply it directly on my original string. Regards, On Tue, Jul 18, 2017 at 10:27 PM, John McKown <john.archie.mckown at gmail.com>
2013 Mar 09
4
Calculation with date
Hello again, Let say I have an non-negative integer vector (which may be random): Vec <- c(0, 13, 10, 4) And I have a date: > Date <- as.Date(Sys.time()) > Date [1] "2013-03-09" Using these 2 information, I want to get following date-vector: New_Vec <- c("2013-03-01", "2014-04-01", "2014-01-01", "2013-07-01") Basically the
2016 Apr 16
2
How to delete Locked files in Mac
Hi, I am looking for some R code, which will delete all files in a Folder that contains both Locked and Unlocked files. There are many, therefore i would like to delete all files programmatically in one go. I used following code : ## "SS" is the Folder name including entire path which contains Locked and Unlocked files. file.remove(file.path(ss, list.files(ss))) [1] FALSE Warning
2013 Jan 15
2
Need some help on Text manipulation.
Dear all, Let say I have following data-frame: Dat <- structure(list(dat = c(-0.387795842956327, -0.23270882099043, -0.89528973290562, 0.95857175595512, 1.61680582493783, -1.17738110289352, 0.210601060411423, -0.827369747447338, -0.36896112964414, 0.440288648776096, 1.28018410608809, -0.897113649961341, 0.342216546981718, -1.17288066266219, -1.57994101992621, -0.913655547602414,
2016 Apr 16
0
How to delete Locked files in Mac
The command: system("chflags -R nouchg /path/to/your/directory") ... should unlock your files recursively in the directory. Then proceed with file.remove() B. On Apr 16, 2016, at 3:09 PM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote: > Hi, > > I am looking for some R code, which will delete all files in a Folder > that contains both Locked and
2017 Jul 18
3
Creating/Reading a complex string in R
Hi again, Let say I have below string (arbitrary) <html> <head> <script type="text/javascript" <script type="text/javascript"> mystatement('current', {'pac':['']}); mystatement; I want to pass above string to some R variable for further analysis. So I have tried below : String = '<html>
2017 Aug 23
4
Getting all possible combinations
Hi again, I am exploring if R can help me to get all possible combinations of members in a group. Let say I have a group with 5 members : A, B, C, D, E Now I want to generate all possible unique combinations with all possible lengths from that group e.g. 1st combination : A 2nd combination : B ..... 5th combination : E 6th combination : A, B 7th combination : B, C .... last combination: A, B,
2017 Jul 19
0
Creating/Reading a complex string in R
It was suggested to quote your string with *backticks* (` ... `) rather than single quotes. String <- `<html> <head> ... ` On 7/18/2017 1:05 PM, Christofer Bogaso wrote: > Thanks for your pointer. > > Is there any way in R how to replace " ' " with " /' " programmatically? > > My actual string is quite lengthy, so changing
2018 Mar 04
3
Change Function based on ifelse() condtion
Below is my full implementation (tried to make it simple as for demonstration) Lapply_me = function(X = X, FUN = FUN, Apply_MC = FALSE, ...) { if (Apply_MC) { return(mclapply(X, FUN, ...)) } else { if (any(names(list(...)) == 'mc.cores')) { myList = list(...)[!names(list(...)) %in% 'mc.cores'] } return(lapply(X, FUN, myList)) } } Lapply_me(as.list(1:4), function(xx) { if (xx ==
2010 Jul 10
7
Need help on date calculation
Hi all, please see my code: > library(zoo) > a <- as.yearmon("March-2010", "%B-%Y") > b <- as.yearmon("May-2010", "%B-%Y") > > nn <- (b-a)*12 # number of months in between them > nn [1] 2 > as.integer(nn) [1] 1 What is the correct way to find the number of months between "a" and "b", still
2018 Mar 04
0
Change Function based on ifelse() condtion
The reason that it works for Apply_MC=TRUE is that in that case you call mclapply(X,FUN,...) and the mclapply() function strips off the mc.cores argument from the "..." list before calling FUN, so FUN is being called with zero arguments, exactly as it is declared. A quick workaround is to change the line Lapply_me(as.list(1:4), function(xx) { to Lapply_me(as.list(1:4),
2018 Mar 04
2
Change Function based on ifelse() condtion
My modified function looks below : Lapply_me = function(X = X, FUN = FUN, Apply_MC = FALSE, ...) { if (Apply_MC) { return(mclapply(X, FUN, ...)) } else { if (any(names(list(...)) == 'mc.cores')) { myList = list(...)[!names(list(...)) %in% 'mc.cores'] } return(lapply(X, FUN, myList)) } } Here, I am not passing ... anymore rather passing myList On Sun, Mar 4, 2018 at 10:37 PM,
2018 Mar 04
2
Change Function based on ifelse() condtion
@Eric - with this approach I am getting below error : Error in FUN(X[[i]], ...) : unused argument (list()) On Sun, Mar 4, 2018 at 10:18 PM, Eric Berger <ericjberger at gmail.com> wrote: > Hi Christofer, > You cannot assign to list(...). You can do the following > > myList <- list(...)[!names(list(...)) %in% 'mc.cores'] > > HTH, > Eric > > On Sun, Mar
2017 Aug 23
3
Getting all possible combinations
ummm, Ista, it's 2^n. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Aug 23, 2017 at 8:52 AM, Ista Zahn <istazahn at gmail.com> wrote: > On Wed, Aug 23, 2017 at 11:33 AM, Christofer Bogaso >
2012 Dec 14
5
A question on list and lapply
Dear all, let say I have following list: Dat <- vector("list", length = 26) names(Dat) <- LETTERS My_Function <- function(x) return(rnorm(5)) Dat1 <- lapply(Dat, My_Function) However I want to apply my function 'My_Function' for all elements of 'Dat' except the elements having 'names(Dat) == "P"'. Here I have specified the name
2017 Aug 02
4
Extracting numeric part from a string
Hi again, I am struggling to extract the number part from below string : "\"cm_ffm\":\"563.77\"" Basically, I need to extract 563.77 from above. The underlying number can be a whole number, and there could be comma separator as well. So far I tried below : > library(stringr) > str_extract("\"cm_ffm\":\"563.77\"",