Displaying 20 results from an estimated 11000 matches similar to: "list as object in dataframe"
2008 Feb 12
3
fun.aggregate=mean in reshape
Hi all,
We are facing a problem while introducing ourselves to Reshape package
use. Melt seems to work fine, but cast fails when we use mean as
fun.aggregate. As you see here, length and sum work fine, but mean
throws this same error whatever dataset we use.
> cast(aqm, month ~ variable, length)
month ozone solar.r wind temp
1 5 26 27 31 31
2 6 9 30 30
2006 Oct 12
2
adding error bars to lattice plots
Dear R users,
About a year ago Deepayan offered a suggestion to incorporate error bars
into a dotplot using the singer data as an example
<<http://finzi.psych.upenn.edu/R/Rhelp02a/archive/63875.html>>.
When I try to utilize this code with a grouping variable, I get an error
stating that the subscripts argument is missing. I have tried to insert
them in various ways, but cannot
2005 Apr 07
2
vectorized approach to cumulative sampling
Hi All,
I need to sample a vector ("old"), with replacement, up to the point
where my vector of samples ("new") sums to a predefined value
("target"), shortening the last sample if necessary so that the total
sum ("newsum") of the samples matches the predefined value.
While I can easily do this with a "while" loop (see below for example
2005 Feb 03
1
Efficient selection and alteration of dataframe records
Hi All,
I am writing a simulation that examines the effects of species
extinctions on ecological communties by sequentially removing
individuals of a given species (sometimes using weighted probabilities)
and replacing the lost individuals with species identities randomly
sampled from the remaining individuals. Thus I use two dataframes. One
contains all the individuals and their species
2006 Nov 06
1
line width (all elements) in Trellis
Dear All,
I am hoping to implement a barchart using trellis graphics where all
elements have a line width of 2.
Using trellis.par.set(), I am able to make most elements lwd=2, but not
all. In particular, the top of the box (above the upper most strip) and
the left y-axis remain one point.
Code with a barchart() example is below. Any advice would be greatly
appreciated.
Thanks for your
2008 May 09
1
Typo in man page for "packBits" (PR#11435)
One occurence of 'packbits' should be 'packBits' (version information
below):
Index: src/library/base/man/rawConversion.Rd
===================================================================
--- src/library/base/man/rawConversion.Rd (revision 55)
+++ src/library/base/man/rawConversion.Rd (working copy)
@@ -41,7 +41,7 @@
of 32 times the length of an integer vector with
2007 Dec 12
1
xYplot problem
Dear R community,
Since upgrading to R v.2.6.1 and re-installing package Hmisc (binary
for Mac OS X v.3.4-3), I have been getting a error when trying to
make xYplots:
>plotcv<-c(34.88, 41.51, 45.81, 51.05, 51.66)
>plotcv.se<-c(2.406551, 3.071291, 4.331407, 3.213873, 4.838150)
>month<-c(6, 7, 8, 9, 10)
>library(Hmisc)
>xYplot(Cbind(plotcv, plotcv + plotcv.se,
2007 Dec 21
1
substitute() bug? (PR#10525)
The first four lines of code below work as normal. The fifth thorows
an error: "Error in paste(theta[1], "=", 5) : object "theta" not found"
x=rnorm(1000);
bob=density(x);
topp=5;
plot(bob,xlab="", ylab="",
main=substitute(paste(theta[1],"=",topp),list(topp=topp)), type="l");
plot(bob$y~bob$x,xlab="",
2007 Oct 27
1
Unwanted axis labels when rug() has POSIXlt argument (PR#10380)
rug() may add integer axis labels when called with a POSIXlt object
as argument.
dtimes <- c("09/29/2007 12:54", "09/30/2007 00:14", "10/01/2007
00:14",
"10/02/2007 00:14", "10/03/2007 00:14", "10/04/2007
00:14",
"10/05/2007 00:14", "10/06/2007 00:14", "10/07/2007
2007 Oct 16
1
The itemize command in *.Rd files.
I'm getting an anomalous result from using the itemize command in a
documentation
file. My usage is something like
\itemize{
\item Melvin
\item Irving
\item Clyde
\item Fred
}
(This was place inside ``\details{ }''.)
(Previously I had enclosed the text following each item in braces but
that gave
even worse results.)
The package appears to install OK; i.e. the command
R
2007 Dec 29
1
capture.output(), truncated last output without \n (PR#10534)
Full_Name: Philippe Grosjean
Version: 2.6.1
OS: MacOS X; Windows XP
Submission from: (NULL) (81.243.237.235)
Last output from capture.output() is truncated if it does not end with a
carriage return:
> capture.output(cat("text\n")) # Fine
[1] "text"
> capture.output(cat("text")) # Missing output!
character(0)
>
2007 Dec 29
2
(PR#10534 capture.output(), truncated last output without
This only happens if 'file' is a text connection, and is the expected
behaviour in that case: you cannot capture an incomplete line to a text
connection.
There seems no reason to break the documented behaviour in other cases to
change something that you consider to a bug when file=NULL and the user
does not produce complete output. It would be possible to make use of
isIncomplete()
2007 Sep 23
3
html help fails for named vector objects (PR#9927)
help(letters, htmlhelp=TRUE) fails.
Under the Mac OSX gui, the message is 'Help for the topic "a" was not
found.' Under the version documented below, and under Windows, the
message is
"No documentation for 'a' in specified packages and libraries:"
repeated for all the elements of letters, then followed by
"you could try
2007 Oct 27
1
having problems re-ordering a dataframe
Dear R users,
I need to reorder a dataframe using 3 variables for the determine the
sorting order.
When I create a simple dataframe to test the method, things work as I
expected:
a1 <- rep(1:10, each=8)
a2 <- rep(rep(1:2, each=4), 10)
a3 <- rep(c(1:4),20)
(a <- data.frame(a1, a2, a3))
for each combination of a1 and a2, a3 is increasing
t <- order(a$a1, a$a2, rev(a$a3))
b
2007 Sep 19
0
[LLVMdev] 2.1 Pre-Release Available (testers needed)
Tanya Lattner wrote:
> You can set the program-prefix to be "llvm-". We actually recommend
> this and its in the README.llvm. We do not require it though.
>
> -Tanya
>
Hello Tanya. Yes, I'm aware of this, but one of the programs that got
installed for me, like i686-apple-darwin8.10.1-gcc-4.0.1, was not
getting the program prefix, and was getting used by gcc.
2008 Apr 03
0
Reloading java classes with rJava
Dear R people,
I have recently started using rJava to interact with Java code that I have
written and am finding it a very useful bridge. Thanks!
I have now run into a problem I can't figure out. If I edit and recompile my
java source code I would like to force rJava to reload the modified java
class. However even doing:
.jinit(force.init=TRUE)
To restart the jvm doesn't seem to do
2008 Jan 18
1
PR#10583
Thank you for your quick reply and for only indirectly scolding me for
abusing the RBugs list. :-) However, I do think there is something
funny in the 2.7.0 docu (or in the code). Things behave as expected and
explained by you for version 2.6.0/2.6.1, but in the development
version 2.7.0 (which I was using) the output is different (see below).
The CHANGES file does mention some changes about the
2007 Sep 19
1
[LLVMdev] 2.1 Pre-Release Available (testers needed)
On Sep 18, 2007, at 10:14 PM, Erick Tryzelaar wrote:
> Tanya Lattner wrote:
>> You can set the program-prefix to be "llvm-". We actually recommend
>> this and its in the README.llvm. We do not require it though.
>>
>> -Tanya
>>
>
> Hello Tanya. Yes, I'm aware of this, but one of the programs that got
> installed for me, like
2008 Jan 24
2
Meridian case
Hi there,
I have a *really* weird issue with rspec on rails:
Given a time meridian formatted using %p
When I run `rake spec` the time meridian is converted to lower case:
expected: "Today 08:00 PM",
got: "Today 08:00 pm"
Yet when I run `rake spec:models` and `spec -cfs app/models` the specs
pass, ie the the time meridian is in upper case.
Anyone got any ideas how I
2008 Feb 21
4
How to get names of a list into df:s?
R users,
I have a simple lapply question.
g <- list(a=1:3, b=4:6, c=7:9)
g <- lapply(g, function(x) as.data.frame(x))
lapply(g, function(x) cbind(x, var1 = rep(names(g), each=nrow(x))[1:nrow(x)]))
I get
$a
x var1
1 1 a
2 2 a
3 3 a
$b
x var1
1 4 a
2 5 a
3 6 a
$c
x var1
1 7 a
2 8 a
3 9 a
And I would like to have
$a
x var1
1 1 a
2 2 a
3 3 a