Displaying 20 results from an estimated 5000 matches similar to: "Coercing character to factor"
2001 Jul 12
2
rpart puzzle
I've been using the package rpart with R 1.3.0 for Windows to produce
simple classification trees for some measurement data from paleontological
specimens. Both the rpart documentation and the output confirm that the
program produces splits on continuous data that leave "holes" in the
data. It is probably of little practical importance, but is there a reason
why the binary
2001 Aug 12
2
rpart 3.1.0 bug?
I just updated rpart to the latest version (3.1.0). There are a number of
changes between this and previous versions, and some of the code I've been
using with earlier versions (e.g. 3.0.2) no longer work.
Here is a simple illustration of a problem I'm having with xpred.rpart.
iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4],
parms=list(prior=c(0.5,0.25, 0.25)))
+ )
>
2001 Jul 25
1
Floating point "fuzz" and rpart?
I've been using rpart with R (1.3.0 Windows) for some time. I recently ran
one of my research data sets through the rpart routine and produced a
classification tree. I tried to replicate the results of the rpart
analysis on another machine of mine and discovered some startling
differences in the results. Puzzled, I went back to the raw data residing
on both machines. I printed out
2001 Jul 27
2
boxplot question
I'm graphing a series of boxplots of grouped data inside a function that
passes the data.frame, the names vector, and a title vector.
Because both the data subset changes with each successive pass through the
function, occasionally the names vector turns up with only one group to
plot. This is an expected result. However, when the names argument in
boxplot has only a single name, it
2001 Sep 13
3
OT: ps -> eps -> MS Word
I've created a bunch of postscript trees (post.rpart), which I subsequently
edit in Adobe Acrobat 4.05 (I need additional labelling that isn't easy to
add with R). After editing the labels and annotations using Acrobat, I
then export the file to Adobe's .eps format so I can insert the picture
into a Microsoft Word 2000 document. The .pdf file distilled from the .ps
file is
2001 Sep 14
0
rpart or Postscript problem?
I've run into another postscript/rpart problem unrelated to the issues I've
mentioned in a previous query.
I'm using 1.3.1 on a Win2K box.
>plotcp(some.rpart.object)
draws a very nice plot on the windows graphic device. If I save this as a
postscript file, either by opening a postscript device before calling
plotcp, or by saving the graphics window as a postscript file, the
2000 May 02
1
Graph superimposition
I'm running a four-group, 15-variable discriminant analysis using the MASS
function lda(). Discriminant functions 1 and 2 explain about 93% of the
variance. I would like to plot the group scatters in a single scatterplot,
identify each group's centroid, and encircle the group scatter with a 90%
bivariate confidence ellipse. I can do this for each group on a separate
plot, but I
2002 Jul 03
2
"Best" Out of box Linux distro for R
At the risk of starting a holy war, I'd like opinions on the "best" current
Linux distribution to run "out of box" with current versions of R. I note
rpms for various versions of RedHat, SUSE, Mandrake, and Debian. I've had
experience with RH 7.1 & 7.2 and it hasn't been entirely pretty. I
understand that 7.3 is a bit "better", but have also
2002 Jul 12
2
Crosstabs in R
Before I reinvent the wheel, I have need for a relatively straightforward
crosstabulation (2 x n) function. I know that R has table(), ftable(),
xtabs(), and summary(xtabs()), but none of these produce a fully "tricked"
out cross-tabulation with marginal totals, expected cell frequencies, and
an array of statistics about the contingency table.
Is there a more complete (something
2002 Mar 23
1
Normal behavior or bug?
>selectiris<-sample(1:5, 150, replace=T)
> hist(selectiris, plot=TRUE) #freq=TRUE, breaks=5, etc all do the same thing
>truehist(selectiris)
Is the behavior of "hist" in this sample of code correct. On my system
(Windows 2K, SP2) the first and second bars are pushed together, while the
3rd, 4th, and 5th bars are correctly positioned.
The function "truehist"
2001 Oct 03
1
R != S-Plus
David Brahm's initial post seems to me to be filled with a mixture of bugs,
wants, and needs coupled with a desire to "make" R become S-Plus. David,
if S-Plus works for you, why are you bothering to convert all your code to
R? No one has ever asserted that R==S (or S-Plus), and there is no reason
to expect this equality to hold, ever.
R is open source. If you want to change
2000 Aug 01
1
Testing for parallel slopes
I'm running a series of simple bivariate linear regressions on grouped
data. I want to test the slopes to see if they are parallel. I normally
use analysis of covariance to do so, looking at interaction between the
covariate and the factor to make this determination.
VR3 pp.149 - 154 has a very nice example of an ANOCOVA, ending with a
discussion of this very operation.
My question has
2001 Feb 26
1
Difference between S-Plus & R 1.2.1
Sorry for the uninformative subject.
The following piece of code gives different output in S-Plus (2K & 6) vs R
1.2.1 (Win)
apply(apehum[,6:15], 2, function(x) which(is.na(x)))
S-Plus results:
> apply(apehum[,6:15], 2, function(x) which(is.na(x)))
$latsupri:
numeric(0)
$medepico:
numeric(0)
$pdhtcapi:
numeric(0)
$mlhtcapi:
numeric(0)
$aphttroc:
[1] 151 152
$mlhttroc:
numeric(0)
2003 May 17
5
how to construct tree under R
Hello.
I have a hudge problem, don't know how to deal with it...
I'm supposed to implement a tree structure in R, without using
rpart library...
I don't have any clue about appropriate approach...
Anyway, I can't use pointers under R...so how to to it?
lists, vectors...
Anyway, does anybody knows how the regression tree in rpart was
implemented...
Someone please help!
Thanks,
ana
2000 Jun 22
1
Summary: 'pausing' in R (fwd)
The question was:
> I have this 'odd' problem; I need to let R pause, for a given time, before
> starting next iteration in a loop. I'm using the following to do this
> task, but feel a little bit guilty because I'm using as much CPU time as I
> can get while pausing:
>
> while(keepGoing) {
> t.end <- proc.time()[3] + 5 ## the time this loop should end
2001 Apr 02
2
Is it possible to...
I have a matrix (1000 x 224) that contains the output from the function
boot.array. For each row, there are 224 columns that represent the case
numbers of the selected individuals from a bootstrap. The cases are listed
in selection order, not numerical order. I'd like to rearrange the cells
so that every row has the column entries listed ascending numeric order.
I've been able to
2001 Mar 13
1
kmeans cluster stability
I'm doing kmeans partitioning on a small (n=26) dataset that has 5
variables. I noticed that if I repeatedly run the same command, the
cluster centers change and the cluster membership changes.
Using RW1022 under Windows NT & Windows 2000
>kmeans(pottery[,1:5], 4, 20)
[...snip]
$size
[1] 7 3 9 7
[...snip]
$size
[1] 7 10 4 5
[...snip]
$size
[1] 6 10 5 5
yields a different
2000 Dec 21
2
Legends on plots
I'm trying to develop a systematic way of placing legends on (among other
things) scatterplots of grouped data. The journals in my field can be very
fussy about the placement of figure legends. Typically they want them to
be in either of two places - the upper left corner of the plotting area,
not obscuring any data points, or outside the plotting area in the lower
right hand corner of
2002 Jan 23
1
?Corrupt Recommended packages source
I'm not really sure this is the place to raise this, but here goes anyway.
I've downloaded the 1.4.0 recommended package sources
R-1.4.0-recommended.tgz multiple times from the main CRAN site. The
sources have arrived corrupted each time (from multiple computers BTW). If
I download the same file from the UCLA or University of Bristol mirror, I
also get corrupt archive files. On the
2000 Nov 19
3
Stataread + R-Devel fails for me
Hi,
I have a problem with R-devel and Stataread 2.5. Stataread installs
(compiles, at gives no error messages). But typing
> library(stataread)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library "/usr/local/lib/R/library/stataread/libs/stataread.so":
/usr/local/lib/R/library/stataread/libs/stataread.so: undefined symbol: errorcall
Error in