Displaying 20 results from an estimated 32 matches for "astext".
Did you mean:
_stext
2011 Feb 13
1
RCytoscape setPosition error
..., 'F')
nodesAll = union(nodesFr, nodesTo)
nElemFr = length(nodesFr)
nElemTo = length(nodesTo)
g <- graph::addNode(nodesAll, g)
setPosition(cw, nodesFr , c(400, 400, 400), c(100, 200, 300))
setPosition(cw, nodesTo , c(600, 600, 600), c(100, 200, 300))
Error in convertToR(xmlParse(node, asText = TRUE)) :
faultCode: 0 faultString: Failed to invoke method setNodesPositions in
class tudelft.CytoscapeRPC.CytoscapeRPCCallHandler: null
setPosition(cw, nodesTo , c(600, 600, 600), c(100, 200, 300))
Error in convertToR(xmlParse(node, asText = TRUE)) :
faultCode: 1001 faultString: Node with i...
2011 Oct 10
1
Text Mining with Facebook Reviews (XML and FQL)
...Lencode('#IBM')
QUERY <- paste('SELECT review_id, message, rating from review where message
LIKE %',Qword,'%',sep='')
Facebook_url = paste('https://api.facebook.com/method/fql.query?query=
',QUERY,sep='')
mydata.xml <- xmlParseDoc(Facebook_url, asText=F)
mydata.vector <- xpathSApply(mydata.xml, '//s:entry/s:title', xmlValue,
namespaces =c('s'='http://www.w3.org/2005/Atom'))
The mydata.xml is NULL therefore no further step can be execute. I am not so
familiar with XML or FQL. Any suggestion will be appreciated. Thank y...
2013 Mar 20
1
htmlParse (from XML library) working sporadically in the same code
...would return the following error coming from htmlParse:
Error: failed to load HTTP resource
Error is coming from the following line in htmlParse code:
ans <- .Call("RS_XML_ParseTree", as.character(file), handlers, as.logical(ignoreBlanks), as.logical(replaceEntities), as.logical(asText), as.logical(trim), as.logical(validate), as.logical(getDTD), as.logical(isURL), as.logical(addAttributeNamespaces), as.logical(useInternalNodes), as.logical(isHTML), as.logical(isSchema), as.logical(fullNamespaceInfo), as.character(encoding), as.logical(useDotNames), xinclude, error, addFinalizer,...
2012 Sep 26
1
RCURL ftp upload - ASCII or Binary type?
I'm trying to upload a file using RCURL:s ftpUpload() to a ftp-server using the following command:
> ftpUpload("'VERY.ODD.FILE.NAME(+1)'",to="ftp://x.x.x.x/","' VERY.ODD.FILE.NAME(+1)'",userpwd="USER:PASSWORD")
OK
0
The file I'm trying to upload is a very simple text-file but with a bit weird filename. Note the ' on each
2009 Jan 17
1
2009 Wish list for R
...voked
- self-contained R executables
- default origin in Date. as.numeric.Date and as.Date.numeric are
asymmetric in this respect.
- here documents in sourced input
- read.table(textConnection(Lines)) later gives annoying warning message
about closing connection. If too hard to fix add an asText= arg,
e.g. read.table(Lines, asText=TRUE)
- View() buttons to copy to clipboard. (print and save might also be nice.)
- allow library() command to determine what is imported like python's
import ... from ...
- Lag < function(x, k, ...) lag(x, -k, ...)
lag is regarded by many as con...
2011 Apr 06
1
Treatment of xml-stylesheet processing instructions in XML module
Hello again,
Another stumble here that is defeating me.
I try:
a<-readLines(url("http://feeds.feedburner.com/grokin"))
t<-XML::xmlTreeParse(a, ignoreBlanks=TRUE, replaceEntities=FALSE,
asText=TRUE)
elem<- XML::getNodeSet(XML::xmlRoot(t),"/rss/channel/item")[[1]]
And I get:
Start tag expected, '<' not found
Error: 1: Start tag expected, '<' not found
When I modify the second line in "a" to remove the following (just
leaving the <rss> t...
2012 Oct 17
0
postForm() in RCurl and library RHTMLForms
...t; thanking you
> veepsirtt
> options(RCurlOptions = list(useragent = "R"))
> library(RCurl)
> url <- "http://www.bseindia.com/histdata/categorywise_turnover.asp"
> wp = getURLContent(url)
>
> library(RHTMLForms)
> library(XML)
> doc = htmlParse(wp, asText = TRUE)
> form = getHTMLFormDescription(doc)[[1]]
> fun = createFunction(form)
> o = fun(mmm = "9", yyy = "2012",url="
> http://www.bseindia.com/histdata/categorywise_turnover.asp")
>
> table = readHTMLTable(htmlParse(o, asText = TRUE),
>...
2015 Feb 05
3
Rcurl crash in R-devel
...to=urlx)
*** caught segfault ***
address 0x0, cause 'memory not mapped'
Traceback:
1: .Call("R_curl_easy_perform", curl, .opts, isProtected,
.encoding, PACKAGE = "RCurl")
2: curlPerform(url = to, upload = TRUE, readfunction =
uploadFunctionHandler(file, asText), ..., curl = curl)
3: ftpUpload(what = filepath, to = urlx)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
Hope it will help,
Sincerely,
Marc
2006 Aug 18
1
customization of ActiveRecord models
...n use MySql''s spatial extensions
with ActiveRecord. The spatial extensions usually require inserts in
the following format:
INSERT INTO `locations` (name, point) VALUES ("location
name",GeomFromText(''POINT(<lng> <lat>''));
And reads as
SELECT name, AsText(point) AS point FROM locations;
While I understand there''s methods to issue custom finder commands, I
don''t recall seeing anything about custom inserts/updates.
Does anyone have any recommendations on how I might handle a situation
like this?
Thanks in advance.
Noah
2012 Apr 16
1
grep and XML
...nge rates from this table:
https://raw.github.com/currencybot/open-exchange-rates/master/latest.json
This is the code that I'm working with:
library(RCurl)
library(XML)
txt<-getURL("https://raw.github.com/currencybot/open-exchange-rates/master/latest.json")
txt<-htmlParse(txt, asText=TRUE)
txt<- getNodeSet(txt, '//p')
So, I can get the node, properly but then, if I try soething like this:
grep(c('USD'), txt)
I get:
integer(0)
Can anyone suggest a way forward?
Yours, Simon KIss
*********************************
Simon J. Kiss, PhD
Assistant Professor, Wilf...
2012 May 28
1
Rcurl, postForm()
...egardless. Yours, Simon Kiss
library(XML)
library(RCurl)
library(scrapeR)
library(RHTMLForms)
#Set URL
bus<-c('http://www.brantford.ca/business/LocalBusinessCommunity/Pages/BusinessDirectorySearch.aspx')
#Scrape URL
orig<-getURLContent(url=bus)
#Parse doc
doc<-htmlParse(orig[[1]], asText=TRUE)
#Get The forms
forms<-getNodeSet(doc, "//form")
forms[[1]]
#These are the input nodes
getNodeSet(forms[[1]], ".//input")
#These are the select nodes
getNodeSet(forms[[1]], ".//select")
*********************************
Simon J. Kiss, PhD
Assistant Professor,...
2011 Aug 25
1
R hangs after htmlTreeParse
...p;startdate=2001-01-01&enddate=2011-08-25&article=2&pagenumber=1&isphrase=no&query=IIM&searchfield=§ion=&kdaterange=30&date1mm=01&date1dd=01&date1yyyy=2001&date2mm=08&date2dd=25&date2yyyy=2011")
.x<-getURL(myurl)
htmlTreeParse(.x, asText=T)
This prints approximately 15 lines of the output from the html document and then mysteriously stops. The command line prompt does not reappear and force quit is the only option.
I'm running R 2.13 on Mac os 10.6 and the latest versions of XML and RCURL are installed.
Yours, Simon Kiss
2005 May 27
1
xmlAttrs and problems with reading node attributes of XML file (b ug?)
...ot;a\" b=\"b\" />\n",
"</mzXML>\n")
cat(xmlFile)
a = function(x,...){
cat("Attributes of ", xmlName(x), ": ");
print(xmlAttrs(x));
cat("\n");
NULL
}
xmlTreeParse(file=xmlFile, asText=TRUE,
handlers=list("startElement"=a) )
And its output:
<?xml version="1.0" encoding="ISO-8859-1"?>
<mzXML xmlns="a" xmlns:xsi="b" xsi:schemaLocation="c">
<parentFile a="a" b="b" />
</mzXM...
2010 Nov 04
3
postForm() in RCurl and library RHTMLForms
Hi RUsers,
Suppose I want to see the data on the website
url <- "http://www.nseindia.com/content/indices/ind_histvalues.htm"
for the index "S&P CNX NIFTY" for
dates "FromDate"="01-11-2010","ToDate"="02-11-2010"
then read the html table from the page using readHTMLtable()
I am using this code
webpage <-
2012 Nov 16
1
xmlParseDoc parser errors
Hi,
I have some XML files that have a processing instruction directly
after the XML declaration
when I do
kgroup.reading <- character(0)
for (file in file_list){kgroup.reading <-
xmlParseDoc(file.path("c:","projects","respositories","dk","004",file))}
I get the error
file name :1: parser error : Start tag expected, '<' not found
2011 Jun 07
1
XML segfault on some architectures
...86_64 x86_64 x86_64 GNU/Linux
> x <- xmlTreeParse(fileName)
*** caught segfault ***
address 0x500001c4f, cause 'memory not mapped'
Traceback:
1: .Call("RS_XML_ParseTree", as.character(file), handlers, as.logical(ignoreBlanks), as.logical(replaceEntities), as.logical(asText), as.logical(trim), as.logical(validate), as.logical(getDTD), as.logical(isURL), as.logical(addAttributeNamespaces), as.logical(useInternalNodes), FALSE, as.logical(isSchema), as.logical(fullNamespaceInfo), as.character(encoding), as.logical(useDotNames), xinclude, error, addFin...
2012 May 15
1
KEGGSOAP installation error
...ding package indices
** testing if installed package can be loaded
*** caught segfault ***
address 0x500001c4f, cause 'memory not mapped'
Traceback:
1: .Call("RS_XML_ParseTree", as.character(file), handlers,
as.logical(ignoreBlanks), as.logical(replaceEntities),
as.logical(asText), as.logical(trim), as.logical(validate),
as.logical(getDTD), as.logical(isURL),
as.logical(addAttributeNamespaces), as.logical(useInternalNodes), FALSE,
as.logical(isSchema), as.logical(fullNamespaceInfo),
as.character(encoding), as.logical(useDotNames), xinclude, error,
addFin...
2011 Apr 06
0
Curious treatment of entities in xmlTreeParse
...encoding,
Parsing this with the following two lines followed by inspecting "t"
shows that the & references have been translated to "&" while other
entity refs have not.
a<-readLines(url(as.character(feeds[2,2])))
t<-XML::xmlTreeParse(a, replaceEntities=FALSE, asText=TRUE)
I'm guessing this is what breaks things when I try to do things with tm:
rss2Reader <- readXML(
spec = list(
Author = list("node", "/item/creator"),
Content = list("node", "/item/description"),
DateTimeStamp = list("function",...
2012 Jan 04
0
RCurl : Problem with submitting using postForm()
...utletsearch.aspx",
`main_0$racingmiddle_0$CityTextBox`="",
`main_0$racingmiddle_0$PostcodeTextbox`="4000",
`main_0$racingmiddle_0$StateDropDownList`="Queensland",
`main_0$racingmiddle_0$SearchButton`="List Outlets")
doc<-htmlParse(page,asText=TRUE)
readHTMLTable(doc)
Any help would be greatly appreciated. I've spent a considerable amount of
time trying to solve this problem and this is as close as I have got to a
solution.
Cheers,
Jai Vaughan
> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: i386-pc-mingw32/i386 (32-bit)...
2012 Feb 23
1
multiple gsub
Hi Guys,
I am relatively new to R and was wondering if I could next my gsub command
in identifying one object
I have data which looks like this: <name>Taiwan_250km</name>
I want it to look like this: Taiwan_250km
So essentially I just want to gsub '<name>' and </name> with nothing!
So far I have got this: PolyNam <-