similar to: Scraping info from a web site?

Displaying 20 results from an estimated 400 matches similar to: "Scraping info from a web site?"

2017 Jun 22
2
Accessing Pointers
Hello, I am relatively new to R and would like to access the document my pointer is pointing to in the following line of code. Need some help. #install.packages('xml2') library('xml2') pg1 <- read_html("www.msn.com") str(pg1) ptr <- pg1[[2]] [[alternative HTML version deleted]]
2017 Jun 22
0
Accessing Pointers
> On Jun 22, 2017, at 12:52 PM, Lawrence Fomundam <lawfom at gmail.com> wrote: > > Hello, > > I am relatively new to R and would like to access the document my pointer "my pointer"? > is pointing to in the following line of code. Need some help. > > #install.packages('xml2') > library('xml2') > pg1 <-
2008 Jan 29
2
Problem with new("externalptr")
Hi, It seems that new("externalptr") is always returning the same instance, and not a new one as one would expect from a call to new(). Of course this is hard to observe: > new("externalptr") <pointer: (nil)> > new("externalptr") <pointer: (nil)> since not a lot of details are displayed. For example, it's easy to see that 2
2008 Jul 03
0
ActiveShipping throwing error in build_access_request
I''m using ActiveShipping to try and query for shipping rates - and when I''m getting an error when it''s building xmlnode. The full code calls and the stack trace are here: http://pastie.org/226833 but here are snippets: result = ups.find_rates(origin, destination, packages) NameError (undefined local variable or method `transitive'' for <UNDEFINED> ...
2016 Sep 15
1
Finalizer execution order question
Given an externalptr object 'pool' which protects an R object 'prot': # SEXP prot = (a dynamically updated list with handles) SEXP pool = R_MakeExternalPtr(p, R_NilValue, prot); R_RegisterCFinalizerEx(pool, fin_pool, TRUE); WRE explains that 'prot' remains in existence as long as 'pool' is around. Does this also mean 'prot' still exists when the
2012 Dec 25
2
reinterpreting externalptr in R
Hi, I am using swig to build a wrapper for an c-function to use it in R. I would like to define a generic function, which gives back a void pointer. On the R side, I know what this pointer is pointing to, whether it is an integer or an string, or something else... but I need to somehow reinterpret the resulting "externalptr" into another form... a function that looks like the
2012 Oct 02
1
ffsave problems
Dear R friends. After having some troubles learning how to create a ffdf object, now I find myself having problems saving it. this is the data i´d like to save: str(DATA) List of 3 $ virtual: 'data.frame': 6 obs. of 7 variables: .. $ VirtualVmode : chr "double" "short" "integer" "integer" ... .. $ AsIs : logi FALSE FALSE FALSE
2012 May 11
1
Passing externalptr to .C()
Greetings. 2.15.0 added this behavior http://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2012/03/29#n2012-03-29 o Passing R objects other than atomic vectors, functions, lists and environments to .C() is now deprecated and will give a warning. Most cases (especially NULL) are actually coding errors. NULL will be disallowed in future. This seems to make sense,
2018 Mar 18
0
`@<-` modify its argument when slot is externalptr
On Sun, 18 Mar 2018, Jialin Ma wrote: > Dear all, > > I am confused about the inconsistent behaviors of `@<-` operator when > used in different ways. Consider the following example: > > library(inline) > > # Function to generate an externalptr object with random address > new_extptr <- cfunction(c(), ' > SEXP val = PROTECT(ScalarLogical(1)); >
2011 Oct 13
1
Package snow: is there any way to check if a cluster is "acticve"
Is there a 'proper' way of checking if cluster is active. For example, I create a cluster called .PBcluster > str(.PBcluster) List of 4 $ :List of 3 ..$ con :Classes 'sockconn', 'connection' atomic [1:1] 3 .. .. ..- attr(*, "conn_id")=<externalptr> ..$ host: chr "localhost" ..$ rank: int 1 ..- attr(*, "class")= chr
2009 Oct 27
1
Rjava, RImageJ, and/or S4 question.
I am out of my league with this question. The following code starts the java imaging program ImageJ from within R, and displays an image (assuming ImageJ is installed on your computer). library(RImageJ) img <- IJ$openImage( file.choose() ) #pick an available .tif file img$show() # make the image object visible # An image is now displayed # find out about the objects involved >
2018 Mar 18
3
`@<-` modify its argument when slot is externalptr
Dear all, I am confused about the inconsistent behaviors of `@<-` operator when used in different ways. Consider the following example: library(inline) # Function to generate an externalptr object with random address new_extptr <- cfunction(c(), ' SEXP val = PROTECT(ScalarLogical(1)); SEXP out = PROTECT(R_MakeExternalPtr(&val, R_NilValue, val)); UNPROTECT(2);
2010 Jul 15
0
impute2mach GenABEL conversion problem
Hi, I've been trying to use the impute2mach function in the GenABEL library. I unfortunately cannot make a working example as when I scale down the files I no longer get an error message. The error message that I get on the full file is: Error in checkSlotAssignment(object, name, value) : assignment of an object of class "NULL" is not valid for slot "data" in an
2006 Apr 21
0
Questions on version arg to setClass and serialized instances
I have a few questions and thoughts regarding class versioning and serialized S4 class instances. How is the version argument to setClass is intended to work? It appears to want an externalptr, but that seems odd to me. setClass("FOO", representation(x="numeric"), version="1.2.3") Error in validObject(.Object) : invalid class
2020 Apr 03
0
The finalizer of the externalPtr does not work when closing R?
See R_RegisterCFinalizerEx() and set onexit to nonzero. Here: https://github.com/wch/r-source/blob/9353ddfa8d30069ad8975e0364307d710f2488d5/src/include/Rinternals.h#L1279-L1280 Gabor On Fri, Apr 3, 2020 at 1:56 PM Wang Jiefei <szwjf08 at gmail.com> wrote: > > Hi all, > > I found that the finalizer of the externalPtr is not called when R is > quitting. However, manually
2012 Apr 26
0
Modifying values into XML with R
Dear R gurus, I use R all the time at work, so one day a problem managing my personal arise data made me think: "Why not use R, it does everything!". Anyway, my goal is to use R to manage my personal music library, and more precisely my playcounts. I have two XML files, one from Winamp and the other one from Itunes. Both have pretty much the same songs, but their playcounts are
2020 Apr 03
0
[External] The finalizer of the externalPtr does not work when closing R?
Use R_RegisterFinalizerEx in your C code. See https://cran.r-project.org/doc/manuals/r-release/R-exts.html#External-pointers-and-weak-references This still gives you only "best effort"; for anything stronger you would need a different approach. In general, finalizers should only be used as a backstop, not as a primary resource management tool (in R or any other garbage-collected
2007 Oct 11
0
2 commits - libswfdec/swfdec_text_format.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h
libswfdec/swfdec_text_format.c | 10 ++++++++-- libswfdec/swfdec_xml.c | 9 ++++++++- libswfdec/swfdec_xml.h | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) New commits: diff-tree 2adb53ebb5ba9d6dbe8993ab64f70f6fad919895 (from 90c5b254605f93fe97116e5032627075a1013957) Author: Benjamin Otte <otte at gnome.org> Date: Thu Oct 11 23:23:08 2007 +0200 make
2015 Jun 05
2
usar Selenium para web scraping
Estimado José Luis Cañadas En lo personal el trabajo de Gregorio que cita Carlos me fue de mucha ayuda, lo único que Rselenium tiene un comportamiento algo extraño, mi problema es en dos líneas, la primera sobre ejemplos que no funcionan (algo cambió), pero la importante es sobre mi trabajo, luego de horas de web scraping por alguna razón da un error, este tiene que ver con el recorrido de todas
2018 Jan 19
1
Web scraping different levels of a website
Hey Ilio, I revisited the previous code i posted to you and fixed some things. This should let you collect as many studies as you like, controlled by the num_studies arg. If you try the below url in your browser you can see that it returns a "simpler" version of the link you posted. To get to this you need to hit F12 to open Developer Tools --> go to Network tab and click on the