Displaying 20 results from an estimated 5000 matches similar to: "'data.frame' method for base::rep()"
2011 Jul 21
0
add label attribute to objects?
Dear all
I know that the R way of documenting things is to work on your project
in package development mode, and document each object (such as data
frames) in a *.Rd files. This should work for gurus. What about a
simpler way to document things, geared for mere mortals?
I was thinking of a label() or tag() function that could store and
retrieve an alphanumeric comment for a given object (for
2012 Jun 11
1
saving sublist lda object with save.image()
Greetings R experts,
I'm having some difficulty recovering lda objects that I've saved within sublists using the save.image() function. I am running a script that exports a variety of different information as a list, included within that list is an lda object. I then take that list and create a list of that with all the different replications I've run. Unfortunately I've been
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 8:59 AM, Morkus wrote:
> Hey Duncan,
>
> Hard to debug? That's an understatement. Eyes bleeding....
>
> In any case, I tried all your suggestions. To get "integer" for the
> final column, I had to change the code to get integers instead of strings.
The last column in iris is actually a factor. That's stored as an
S3-classed integer vector
2017 Oct 29
0
Cannot Compute Box's M (Three Days Trying...)
On 29/10/2017 7:26 AM, Morkus wrote:
> Thanks Duncan. I can't tell you how helpful all your terrific replies
> have been.
>
> I think the biggest surprise is that nobody appears to be using Java and
> R together like I"m trying to do. I suppose it should be a surprise
> since there are no books on the subject and almost no technical
> documentation other than a
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
On 28/10/2017 7:12 AM, Morkus wrote:
> Thanks Duncan. Awesome ideas!
>
> I think we're getting closer!
>
> I tried what you suggested and got a possibly better error...
> .
> .
> .
> rConnection.assign("boxMVariable", myDf);
>
> *String resultBV *= *"str(boxMVariable)"*; *// your suggestion.*
>
> *RESULTING ERROR:*
>
>
2010 Jun 09
4
question about "mean"
Hi there:
I have a question about generating mean value of a data.frame. Take
iris data for example, if I have a data.frame looking like the following:
---------------------
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4
0.2 setosa
2 4.9 3.0 1.4
0.2
2017 Oct 29
2
Cannot Compute Box's M (Three Days Trying...)
Thanks Duncan. I can't tell you how helpful all your terrific replies have been.
I think the biggest surprise is that nobody appears to be using Java and R together like I"m trying to do. I suppose it should be a surprise since there are no books on the subject and almost no technical documentation other than a few sites here and there.
-----
I originally had the "int" as the
2004 Jun 24
0
tree model with at most one split point per variable
I would like to create a tree model with at most one split point per variable
using tree, rpart or other routine. Its OK if a variable enters at more
than one node but if it does then all splits for that variable should be
at the same point. The idea is that I want to be able to summarize the
data as binary factors with the chosen split points. I don't want to
have three level or more
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Hey Duncan,
Hard to debug? That's an understatement. Eyes bleeding....
In any case, I tried all your suggestions. To get "integer" for the final column, I had to change the code to get integers instead of strings.
double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles();
double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles();
double[] d3 = ((REXPVector)
2009 Apr 10
0
Didactic example and doubt: how to compare two regression line slopes
Hi,
I read almost all I found in prior R-Help list about How to compare
two regression line slopes.
So, I made a didactic example to illustrate a solution cited by Ben Bolker:
===============================================
Subject: Re: [R] How to compare two regression line slopes
From: Ben Bolker (bol... at ufl.edu)
Date: Jan 27, 2009 1:52:20 pm
List: org.r-project.r-help
2005 Sep 26
3
How to get the rowindices without using which?
Hi,
I was wondering if it is possible to get the
rowindices without using the function "which" because
I don't have a restriction criteria. Here's an example
of what I mean:
# take 10 randomly selected instances
iris[sample(1:nrow(iris), 10),]
# output
Sepal.Length Sepal.Width Petal.Length Petal.Width
Species
76 6.6 3.0 4.4 1.4
2009 Oct 17
1
Easy way to `iris[,-"Petal.Length"]' subsetting?
Dear all
What is the easy way to drop a variable by using its name (and not its
number)? Example:
> data(iris)
> head(iris)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1
2010 Feb 03
1
Calculating subsets "on the fly" with ddply
Hi,
[I sent this to the plyr mailing list (late) last night, but it seems
to be lost in the moderation queue, so here's a shot to the broadeR
community]
Apologies in advance for being more verbose than necessary, but I'm
not even sure how to ask this question in the context of plyr, so ...
here goes.
As meaningless as this might be to do with the `iris` data, the spirit
of it is what
2011 Aug 16
3
Newbie question - struggling with boxplots
Hopefully I will not be flamed for this on the list, but I am starting out
with R and having some trouble with combining plots.
I am playing with the famous iris dataset (checking out example dataset in R
while reading through Introduction to datamining)
What I would like to do is create three graphs (combined boxplots) besides
each other for each of the three species (Setosa, Versicolour and
2012 Aug 28
1
don't print object attributes
Dear all
Suppose the object below:
> require(Hmisc)
> require(plyr)
> x <- dlply(iris, .(Species), describe)
How can I print the object without displaying the attributes? I
inspected ?print and ?print.default with no luck.
> x
$setosa
x[, "Sepal.Length"]
n missing unique Mean .05 .10 .25 .50 .75
50 0 15 5.006 4.40 4.59
2009 Sep 09
1
change character to factor in data frame
Dear all
I have a simple problem which I thought is easy to solve but what I tried
did not work. I want to change character variables to factor in data
frame. It goes easily from factor to character, but I am stuck in how to
do backwards conversion.
Here is an example
irisf<-iris
irisf[,2]<-factor(irisf[,2]) # create second factor
str(irisf)
'data.frame': 150 obs. of 5
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Thanks Duncan. Awesome ideas!
I think we're getting closer!
I tried what you suggested and got a possibly better error...
.
.
.
rConnection.assign("boxMVariable", myDf);
String resultBV = "str(boxMVariable)"; // your suggestion.
RESULTING ERROR:
Error in format.default(nam.ob, width = max(ncn), justify = "left") : invalid 'width' argument
(No idea
2013 Jul 22
1
union of a list of logical values
Dear all,
How can I obtain the union of a list of logical values?
Consider the following:
x <- head(iris)
x[,c(2,4)] <- NA
x[c(2,4),] <- NA
# > x
# Sepal.Length Sepal.Width Petal.Length Petal.Width Species
# 1 5.1 NA 1.4 NA setosa
# 2 NA NA NA NA <NA>
# 3 4.7 NA 1.3
2012 Jul 23
1
duplicated() variation that goes both ways to capture all duplicates
Dear all
The trouble with the current duplicated() function in is that it can
report duplicates while searching fromFirst _or_ fromLast, but not
both ways. Often users will want to identify and extract all the
copies of the item that has duplicates, not only the duplicates
themselves.
To take the example from the man page:
> data(iris)
> iris[duplicated(iris), ] ##duplicates while
2009 Jul 03
2
Two questions about the cloud function in the lattice package
Hi,
I have two questions regarding the cloud function in the lattice
package:
1) Is there a way to not print the surrounding frame (i.e. the square
surrounding the entire plot)?
2) Is there a way to italicize the text displayed with the key argument?
Some sample code:
data(iris)
cloud(Sepal.Length~Petal.Length*Petal.Width,data=iris,
groups=Species,screen=list(z=20,x=-70),