Displaying 20 results from an estimated 200 matches similar to: "exportation of xml file from R"
2018 Mar 21
2
how to add a child to a child in XML
I am trying to add a child to a child using XML package in R. the following fails
library(XML)
node1 <- c("val1","val2","val3")
names(node1) <- c("att1","att2","att3")
root <- xmlNode("root", attrs=node1)
node2 <- LETTERS[1:3]
names(node2) <- paste("name",1:3,sep="")
root <-
2018 Mar 22
2
how to add a child to a child in XML
Big thanks. newXMLNode works great. Wonder why it is not included in the documentation.
There is newXMLDoc and newXMLNamespace, but no mention of newXMLNode.
Stephen
From: Ben Tupper [mailto:btupper at bigelow.org]
Sent: Wednesday, March 21, 2018 6:18 PM
To: Bond, Stephen
Cc: r-help
Subject: Re: [R] how to add a child to a child in XML
Hi,
XML doesn't use the `$` to access child nodes.
2018 Mar 21
0
how to add a child to a child in XML
Hi,
XML doesn't use the `$` to access child nodes. Instead use either `[name]` to get a list of children of that name or `[[name]]` to get the just the first child of that name encountered in the genealogy. Thus for your example...
> root$child1
NULL
> root[['child1']]
<child1 name1="A" name2="B" name3="C"/>
On the other hand, you might
2012 Feb 10
3
Creating XML document extremely slow
Hi list,
I'm using the package XML to create a simple XML document.
Unfortunately constructing the XML tree is extremely slow. My code
(see below) adds only about 100 nodes per second on an Intel i5
machine. There's clearly something wrong but I don't see what.
Here's a sample of the XML document:
<?xml version="1.0" encoding="utf-8"?>
2018 Mar 22
0
how to add a child to a child in XML
Hi,
It's a reasonable question. The answer is that it actually is included, but there are many instances across packages where multiple functions are documented on a single help page. The following brings up such a page... (for XML_3.98-1.9)
> library(XML)
> ?newXMLNode
You can see the same on line...
https://www.rdocumentation.org/packages/XML/versions/3.98-1.9/topics/newXMLDoc
2018 Mar 22
1
how to add a child to a child in XML
Just to clarify and hopefully catch the attention of the maintainer:
The newXMLNode function is not mentioned in:
https://cran.r-project.org/web/packages/XML/XML.pdf
which supposedly describes all functions in the package.
Stephen
From: Ben Tupper [mailto:btupper at bigelow.org]
Sent: Thursday, March 22, 2018 10:40 AM
To: Bond, Stephen
Cc: r-help
Subject: Re: [R] how to add a child to a
2009 Nov 03
1
help with SSOAP (can't find working examples)
First of all, let me confess that I am a newbie to R and don't know
much about the language or the environment. We have a need for
plugging in R in our production runtime and need the ability to pull
data out of our existing services. I am trying to see if I can take
advantage of SSOAP such that we can expose the data via webservices
and use SSOAP to call into them. Our runtime is mostly
2001 Oct 18
1
tapply problem
Hello everybody.
I have a question that has stumped me and the usual "apply" tricks
don't seem to work. I run a course where each student's performance
is marked by one or more assessors.
I have a data frame containing students' names, assessors' names and
their marks, arranged as follows:
ID student assessor Q1A Q1B Q1C Q2A Q2B Q3
1 2152833
2003 Feb 25
1
How to modify XML documents and save changes
Dear,
I want to read XML documents, add child nodes to some elements and store
everything back as an XML document.
I've tryed the following:
doc <- xmlTreeParse("file.xml")
QTListNode<-xmlElementsByTagName(xmlRoot(doc)[[1]],"tagname")
append.xmlNode(QTListNode[[1]],newXMLNode(name ="Norm", attrs = NULL))
saveXML(doc, file = "out.xml",
2012 Nov 14
2
How to filter xml value in R?
Hi,
I have one xml file.
<Class>
<Node1 code ="1"> First node </Node1>
<Node2 code ="1"> Second node </Node2>
<Node3 code ="1"> Third node </Node3>
<Node1 code ="2"> Fourth node </Node1>
</Class>
for (i in 1:xmlSize())
{
print(Class[i]) # how can i filter Node1 ?
}
by
2005 Sep 05
3
Assessing network quality
I am trying to trouble shoot one of my ISP's network and compare to my
other ISPs offering. Although network 1 is reasonably fast and has low
enough latency, voice quality is not good and the reason for this is not
readily apparent using standard network tools.
What tools can be used to assess the quality of the network in terms of
it's suitability for voice? I am using ping, mtr,
2010 Dec 14
1
binding data.frames with sequential names
Hello,
I have data frames X1 to X19
I want a simple way to bind them as the next run(s) will generate many
more sequential data frames.
I tried the following with i = 19:
> my.list <- as.list(paste("X",1:i,sep=""))
> new.data <- do.call("rbind", my.list)
> new.data
[,1]
[1,] "X1"
[2,] "X2"
[3,] "X3"
[4,]
2010 May 04
2
converting an objects list
Hello,
I would like to convert an objects list such as objects() or ls() that outputs "a101" "a102" "a104" "a107" "a109"
to read within a list statement as follows : list(a101,a102,a104,a107,a109)
Thanks
Tony
2009 Jan 22
14
Antivirus for CentOS? (yuck!)
Hi All,
Yes, I know, it's really really embarrassing to have to ask but I'm
being pushed to the wall with PCI DSS Compliance procedure
(http://en.wikipedia.org/wiki/PCI_DSS) and have to either justify why
we don't need to install an anti-virus or find an anti-virus to run on
our CentOS 5 servers.
Whatever I do - it needs to be convincing enough to make the PCI
compliance guy tick the
2005 Jul 20
2
Samba-3.0.10 domain issue
Hi,
I have a working samba setup using ldap from following the
smbldap-installer scripts etc, but now have one remaining problem. This
is the second time I have installed it and had it working reasonably well
being used in an educational environment.
My problem this time is that each workstation has 3 operating systems -
Windows98SE, Win2K and WinXP. Last time I created the domain it was fine
2008 Jun 10
1
Parse XML
Could someone provide a link or examples of parsing XML document in R? Few
specific questions below:
For instance I can retrieve specific nodes using this:
node <- xpathApply(xml, "//" %+% xtag, xmlValue)
1) I want to be able to retrieve parent node for this node, how can I do
this? getParentNode() does not seem to cut it.
2) How can I retrieve children nodes for a particular
2012 Apr 21
1
how to write html output (webscraped using RCurl package) into file?
i want
"http://scop.berkeley.edu/astral/pdbstyle/?id=d1fjgc2&output=html",showing
information in webpage to be written in .txt file as it is(i don't want any
html tag)
i am using "RCurl" package
>marathi<-htmlTreeParse("http://scop.berkeley.edu/astral/pdbstyle/?id=d1fjgc2&output=html")
>marathi
2008 Jul 02
1
Removing or overwriting an XML node
Hi,
I have an existing XML document on disk, which I'd like
to use as a template, and exchange a subnode with my own
newly created subtree:
<?xml version="1.0"?>
<Duncan>
<name a="1" b="xyz">
<first>Duncan</first>
<last>Temple Lang</last>
</name>
</Duncan>
created by e.g.
? library(XML)
2007 Mar 09
4
Using large datasets: can I overload the subscript operator?
Hello,
I do some computations on datasets that come from climate models. These data
are huge arrays, significantly larger than typically available RAM, so they
have to be accessed row-by-row, or rather slice-by slice, depending on the
task. I would like to make an R package to easily access such datasets
within R. The C++ backend is ready and being used under Windows/.Net/Visual
Basic, but I have
2008 Jan 19
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/image test/swfdec_test.c test/swfdec_test_image.c test/trace
libswfdec/swfdec_as_strings.c | 2
libswfdec/swfdec_sprite_movie_as.c | 22 ++--
libswfdec/swfdec_xml.c | 117 ++++++++++++++++-------
libswfdec/swfdec_xml.h | 8 -
libswfdec/swfdec_xml_node.c | 32 +++---
libswfdec/swfdec_xml_node.h | 2