Displaying 20 results from an estimated 10000 matches similar to: "lattice panel question"
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
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 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
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
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
Hello,
I'm trying to compile vmkit on a x86_64 linux box with gcc-4.1.2, but
I'm running into troubles because of various problems with casts
between pointers and integers. Is there anybody who succeeded in this
task? Az I see, some of the problems can be fixed with an appropriate
typedef/macro declaration, but in VMCore/JavaObject.cpp some lowlevel
bitmanipulation is used, to mark
2011 Mar 10
1
How to use conditional statement
Dear R helpers
Suppose
val1 = c(10, 20, 35, 80, 12)
val2 = c(3, 8, 11, 7)
I want to select either val1 or val2 depending on value of third quantity val3.
val3 assumes either of the values "Monthly" or "Yearly".
If val3 = "Monthly", then val = val1 and if val3 = "Yearly", then val = val2.
I tried the ifelse statement as
ifelse(val3 =
2012 Nov 23
2
Barplot with lines
Hi,
I'm trying to plot stacked barplot with lines on it. Here is the data.
emp days val1 val2 score
1 21 1 0 1200
2 35 1 1 na
3 42 na na 3000
4 53 2 1 2100
5 64 1 0 na
6 73 na na 1400
My X-axis is days. I'm looking to plot val1,val2 as stacked bars and score
as lines with different y-axis. I could get the bar plot and lines on it
but the problem is the bars and lines are not aligning
2016 Feb 08
2
Memory Store/Load Optimization Issue (Emulating stack)
Hello,
I am trying to emulate the "stack" as like on x86 when using push/pop so
afterwards I can use LLVM's optimizer passes to simplify (reduce junk) the
code.
The LLVM IR code:
define { i32, i32, i32 } @test(i32 %foo, i32 %bar, i32 %sp) {
; push foo (On "stack")
%sp_1 = sub i32 %sp, 4
%sp_1_ptr = inttoptr i32 %sp_1 to i32*
store i32 %foo, i32* %sp_1_ptr, align
2016 Feb 10
4
Memory Store/Load Optimization Issue (Emulating stack)
Thank you for the hint.
I adjusted the code and it works:
The code after replacing inttoptr with getelementptr:
define { i32, i32, i8* } @test(i32 %foo, i32 %bar, i8* %sp) {
entry:
; push foo (On "stack")
%sp_1 = getelementptr i8, i8* %sp, i32 -4
%sp_1_ptr = bitcast i8* %sp_1 to i32*
store i32 %foo, i32* %sp_1_ptr, align 4
; push bar
%sp_2 = getelementptr i8, i8* %sp_1,
2011 Aug 15
1
2 matrix scatter x [a lot]
Hello,
I'm pretty new to R. Basically, how do I speed up the for loop below. Or
better yet, get rid of the for loop all together.
objective: plot two data sets column against column by index. These data
sets have alot NA's. Some columns are all NA's. I need the plots to overlay.
I don't like the plots in matplot(). Needs to be much faster than the code
below...
#simple sample
2008 Jul 01
0
[LLVMdev] vmkit on x86_64
Hi Zsombor,
Thanks for the patch! Unfortunately I can't apply it because the llvm
API has moved from BinaryOperator::create to BinaryOperator::Create. Are
you using svn head?
Now on the x86_64 part. There has been very little work on porting vmkit
on x86_64. If you're having compilation problems, I suppose it's in the
garbage collector directory (GCMmap2). If you could make the
2011 Feb 03
2
R-help
Hi,
I have data like this....
print(x)
ID VAL1 VAL2
1 B A
2 P Q
3 T S
What I would like is data like this...
ID VAL1 VAL2
1 A B
2 P Q
3 S T
So that VAL1 and VAL2 are alphabetically ordered.
Any advice is welcome!
San.
[[alternative HTML version deleted]]
2009 Mar 03
2
preparing data for barplot()
What is the best way to produce a barplot from my data? I would like
the barplot to show each person with the values stacked
val1+val2+val3, so there is one bar for each person When I use
barplot(data.matrix(realdata)), it shows one bar for each value
instead.
To post here, I created an artificical data set, but it works fine.
fakedata <- as.data.frame(list(LETTERS[1:3]))
colnames(fakedata)
2016 Feb 10
2
Memory Store/Load Optimization Issue (Emulating stack)
Thanks for the answers. Although I am not sure if I've understood the docs
about how inttoptr/ptrtointr are different when compared to gep.
It says: "It’s invalid to take a GEP from one object, address into a
different separately allocated object, and dereference it.".
To go back to my intention why I am doing this, I would like to "emulate"
some x86 instructions with
2009 Feb 17
4
joining "one-to-many"
Hello list,
I am wondering if a joining "one-to-many" can be done a little bit easier. I tried merge function but I was not able to do it, so I end up using for and if.
Suppose you have a table with locations, each location repeated several times, and some attributes at that location. The second table has the same locations, but only once with a different set of attributes. I would
2006 Oct 19
2
Getting group size in a data frame
Hi all,
I have a data frame with some measured values of some animals. Sometimes the
measurement failed, resulting in a NA for a measurement and sometimes the
animal died, resulting in NA for all measurements.
I have several groups of animals. How do I find the size of each group with
only alive animals? And how do I find the size of the groups for each
measurement?
An example:
l1 <-
2016 Feb 12
2
Memory Store/Load Optimization Issue (Emulating stack)
Hi again,
So I finally gave up on trying to get through the converting (x86' push pop
mov add) because it deals a lot with crazy pointer arithmetics and sonce
inttoptr and ptrtoint doesn't provide any alias analysis information.
Daniel, you said it doesn't make much sense to provide it but in my cases
it is actually very much needed, you didn't say it wasn't possible to
2002 Nov 06
1
Aggregating a List
Hi all,
There must be a really obvious R solution to this, but I can't figure out
how to aggregate a list. For instance, if I read.table the following from
a file:
Val1 Val2
A 3 4
A 5 6
B 4 4
I would like to take the mean (or median) across any/all rows of type "A"
to end up with the structure:
Val1 Val2
A 4 5
B 4 4
in this case. How would I go about doign that w/o doing a
2012 Oct 18
1
mean value calculation
Dear all,
I want to calculate mean values for multiple rows:
structure(list(Name = structure(c(1L, 1L, 1L, 1L, 1L, 2L, 2L,
2L, 2L), .Label = c("AKT", "CKT"), class = "factor"), val1 = c(2,
3, 2, 2, 2, 5, 3, 8, 2), val2. = c(4, 5, 4, 8, 4, 8, 4, 7, 4),
val3 = c(5, 6, 5, 9, 5, 9, 5, 9, 5)), .Names = c("Name",
"val1", "val2.",