Johan -
Disclaimer: I've never used heatmap(), so probably I shouldn't
be answering this.
However ... the function heatmap() probably calls either plot()
or image() (regular graphics) or xyplot() (lattice graphics) in
order to set up axes and initialize the actual plotting. heatmap()
may
Florian -
One thing to *try* would be: work from the R
command line and set the parameter "nlines" in
read.table() to one less than the number of
lines of data in the file. If this works, then
you can at least read in all but the last line.
I suspect something like a missing newline
character
0) vysled[i]<-sd(sample(y,100))
> mean(vysled)
>
> to get bootstraped estimation of sd(y)
>
> My actual data have some missing values and some outliers which I can either
> remove or to use some robust statistics for mean and variation estimates.
>
> Thank you and
Petr -
Very briefly, I think of three ways to approximate the standard
deviation of y = f(x1,x2,x3).
(1) linearise f() and use the covariance matrix of [x1,x2,x3].
(2) simulate draws from the joint distribution of [x1,x2,x3],
then compute the sample std dev of resulting f()s.
(3)
Dear L Z -
Before using contour() one needs to interpolate the z values
to all points in a rectangular grid. 2D interpolation is not
trivial. The package KernSmooth (case-sensitive) will do this
for a density estimate but not, apparently, when z values are
given. Perhaps packages splines or
Rex -
Yes, you have supplied an appropriate 'weight' argument
given the problem description in the paragraph which
begins 'Assume that ...'.
Your example would be much easier to read if the variable
names 'x' and 'y' in the R code matched their usage in the
paragraph description, rather than tra
Peter -
(Just gessing about the structure of rpart objects ...) How about
tr.totpart.pruned$frame <- cbind(tr.totpart.pruned$frame,
meanpart = exp(tr.totpart.pruned$frame$yval)-1)
This appends meanpart as an additional column of tr.totpart.pruned$frame.
After this step
On Fri, 19 Dec 2003, Murray Jorgensen wrote:
> Thomas W Blackwell wrote:
>
> > [...]
> > Why not simply use dist() and hclust() ? Starting with
> > presence/absence data, what could mclust() possibly do that
> > is different from hclust() ?
>
> Um
On Thu, 18 Dec 2003, Jarrod Hadfield wrote:
> Dear All,
>
> I have spatial data (presence/absence for 4000 squares) on 250 bird
> species and would like to use a model-based clustering technique to
> test for species associations. Is there any way of passing a
> distance/correlation matrix to mcl
Frank -
I recall some recent discussion on this list about installing
Design on a Mac. Try the mail archive for a message from
Frank Harrell, the package author and maintainer within the
last five weeks. Your question sounds very similar to the
question I remember . . . but mine is only a human
Allan -
Brian Ripley's implementation of one of the more useful Lp norms is:
library("lqs")
help("lqs")
This is very highly recommended for practical data analysis.
- tom blackwell - u michigan medical school - ann arbor -
On Thu, 18 Dec 2003, allan clark wrote:
> Hi all
>
> Just wonde
On Wed, 17 Dec 2003, Savano S. Pereira wrote:
> UseRs,
>
> I used the optim function
>
> valor.optim <- optim(c(1,1,1),logexp1,method
> ="BFGS",control=list(fnscale=-1),hessian=T);
>
> and I want to calculate the derivates, [ ... snip ... ]
>
> but I found, [ ... snip ... ]
>
> The derivates are
Murray -
If you could guarantee that all of the email addresses have
exactly one occurrence of the "@" character in them, then
something like
spit <- do.call("rbind", strsplit(addresses, "@", FALSE))
will produce a data frame with either two or three character
vectors as the columns, in which u
(oops, wrong keystroke)
... in the unix source directories (at least for Redhat linux)
on CRAN.
- tom blackwell - u michigan medical school - ann arbor -
On Fri, 12 Dec 2003, Stephen Dicey wrote:
> How can I set up the CLEDITOR (command line) variable in R if there is
> one? I am on a Sol
Stephen -
If command line editing does not work as it should, I would look
first into providing a patched readline. See Graeme Ambler's
patched version in
On Fri, 12 Dec 2003, Stephen Dicey wrote:
> How can I set up the CLEDITOR (command line) variable in R if there is
> one? I am on a Solaris
Vincent -
>From the values shown, this looks like a Bioconductor question,
rather than base R. You might try the maintainers of whatever
package the function comes from.
Is 2287 the index in "levels" for one of the character strings
shown ?
- tom blackwell - u michigan medical school - an
Ellen -
plot(my.x.vector, my.y.vector, xlim=c(-3,3), ylim=c(-3,3))
It's the named arguments xlim and ylim that you were looking for.
I frequently set them as xlim = 3 * c(-1,1), ylim = 3 * c(-1,1)
so that I can change the range by editing just one number rather
than two. For an added fillip, t
Mathieu -
That's easy. Assign the return value of hist() to some
variable, say "fixed", then go in and hack the value of
fixed$counts however you like, and re-plot using plot(fixed).
Example code:
fixed <- hist(rnorm(2000))
fixed$counts <- fixed$counts / 5
plot(fixed)
I confess I didn't quite
Bruno -
Many people add a tiny random number to each of the distances,
or deliberately randomize the input order. This means that
any clustering is not reproducible, unless you go back to the
original randoms, but it forces you not to pay attention to
minor differences.
Ah, I think you're askin
Thomas -
"sup" stands for "supremum" or "maximum". The criterion for
complete linkage clustering is that the two groups with the
smallest maximum distance between any of their members will
be joined at each stage.
(I dare say you will have recieved many similar responses
already, but none on-li
On Wed, 3 Dec 2003, Arend P. van der Veen wrote:
> Your recommendations have worked great. I have found both cut and
> ifelse to be useful.
>
> I have one more question. When should I use factors over a character
> vector. I know that they have different uses. However, I am still
> trying to f
Stephen -
If the four columns shown below are in this order in a data
frame named 'data', then use
covariances <- by(data[ ,-1], data$Class, cov)
to get the covariance matrices within each of the four classes.
Alternative functions would be tapply() or aggregate(), but
the syntax for by()
Eugene -
Is the estimand in your problem (the parameter which you seek
to estimate) discrete-valued or continuous-valued ? If it is
discrete-valued, then you are heading in the wrong direction,
because no matter how smooth you make the objective function,
you will not be able to differentiate it
Arend -
Here is a sequence of commands which will do it.
These first build a vector of (4+1) cutpoints,
then cut() returns a factor whose labels are
the colors and codes are determined by x. Last,
as.character() turns the factor into the character
vector which you ask for. Or, perhaps the fa
William -
I don't have an answer for you, just some stream of
consciousness rambling about how I would go about
diagnosing this, if it were my problem.
In my installation directory (of R-1.7.1 on linux) there
is a file config.log which contains all of the configure
script's queries and replies
Martin -
Do you want a goodness of fit measure for a Poisson glm ?
I would start py plotting the residuals and doing an
analysis of deviance on nested models. See McCullagh and
Nelder, as well as more recent references.
- tom blackwell - u michigan medical school - ann arbor -
On Fri, 2
Martin -
I can't figure out what question you are asking.
Does either predict.glm() in the base package or
cv.glm() in the boot package do what you want ?
The theory for all of this is given in the references
listed in the help pages for "glm" and "cv.glm".
- tom blackwell - u michigan
irst place.
- tom blackwell - u michigan medical school - ann arbor -
On Fri, 21 Nov 2003, Thomas W Blackwell wrote:
> Nicolaas -
>
> help.search("kruskal") returns:
>
> kruskal.test(ctest) Kruskal-Wallis Rank Sum Test
>
> This means that the function i
Nicolaas -
help.search("kruskal") returns:
kruskal.test(ctest) Kruskal-Wallis Rank Sum Test
This means that the function is kruskal.test() in the
ctest package. In order to run it, you must do
library("ctest") first.
HTH - tom blackwell - u michigan medical school - ann arbor
Anthony -
It seems just possible that the difficulty may have nothing to do
with nlme() or any other data analysis. The graph you describe
could result if one of the y-values was five time as large as any
of the others. This could result from an error in reading the
data input file, a missing
Kenneth -
I recall a message on the [r-pkgs] list from Ray Brownrigg
on November 1 this year that may be relevant. At that time
he was announcing the availability of maps_2.0-8.zip and
some other packages.
Therefore, 2.0-10 must be *very* recent and might still be
going through the CRAN prop
n = length(r).
- tom blackwell - u michigan medical school - ann arbor -
On Mon, 17 Nov 2003, Rajarshi Guha wrote:
> On Mon, 2003-11-17 at 20:01, Thomas W Blackwell wrote:
> > Rajarshi -
> >
> > Do you want three sets, three disjoint sets, or sets of
> > si
Rajarshi -
Do you want three sets, three disjoint sets, or sets of
size three ? It's not clear what you are attempting to do.
- tom blackwell - u michigan medical school - ann arbor -
On Mon, 17 Nov 2003, Rajarshi Guha wrote:
> Hi,
> I'm trying to write a function that will divide a g
Try help("INSTALL") (case-sensitive).
- tom blackwell - u michigan medical school - ann arbor -
On Mon, 17 Nov 2003, Monica Palaseanu-Lovejoy wrote:
> hi y'all,
>
> I am wondering if there is any special command, function,
> package, etc to help me doing a cumulative distribution functi
On Mon, 17 Nov 2003 [EMAIL PROTECTED] wrote:
> Dear list members,
>
> I am trying to use "nlm" function to maximize a mixture likelihood of beta
> densities. There are five unknown parameters in the likelihood. Since I can
> get the analytic gradient, I attach the "gradient" attribute in my target
David -
I had to try your example verbatim before I understood what is
happening. index <- numeric() creates a vector with no entries.
Therefore the subscript is neither positive or negative, rather
it contains no numeric values, so the return contains no entries
either. Works the same in R-1.7
Mikyoung -
All answers are "yes", but IMHO you are trying to be
too clever with your data structure. Programming is
*much* easier if you keep things simple.
Specifically:
(1) The function matrix() will happily build you
a matrix of type "list", with each element of the list
occupying one ce
Jesper - (off-list)
Jim MacDonald reports seeing different memory-management behavior
between Windows and Linux operating systems on the same, dual boot
machine. Unfortunately, this is happening at the operating system
level, so the R code cannot do anything about it. I have cc'ed
Jim on this
> On Mon, 10 Nov 2003, Thomas W Blackwell wrote:
>
> > The second argument to boot(), called 'statistic', can be
> > any user-written function you want to cook up, with additional
> > arguments being passed to it through the '...' mechanism after
>
Kjetil -
Frankly, your file would be much, much easier to read
if it didn't have a row name at the beginning of each
line. Any chance you can edit it to remove those ?
Then, I think you could read in the numeric data with
just one call to scan:
mat <- matrix(0, 21, 21)
mat[row(mat) >= col(mat
Paul -
This situation seems like an obvious candidate for a log-linear model.
See the book MASS for details. They're beyond the scope of this list.
Or try help.search("log-linear").
(and ... can you find a way to break lines when sending your email ?)
- tom blackwell - u michigan medical s
Scott -
The second argument to boot(), called 'statistic', can be
any user-written function you want to cook up, with additional
arguments being passed to it through the '...' mechanism after
all of the named arguments. (See: `R-intro `Writing your own
functions `The ellipsis argument for det
Ann -
Maybe you are looking for
plot( ..., xlab="", ylab="")
followed by title(xlab="the real x axis label")
title(ylab="the real y axis label", mgp=c(2.5,0.5,0))
This is a construction that I use all, all, all the time.
- tom blackwell - u michigan medica
JB and Michael -
I'm coming into this without having reviewed the earlier emails
(if there are any) in this thread. But I will guess that the
data come from a high school physics experiment on gravitational
acceleration which drops a weight dragging a paper tape through
a buzzer with a piece of
Ken -
Either test each simulated data set explicitly for the
condition which causes factanal() to fail (perhaps rank
deficiency ?), or else use try(). Which is quicker,
using try() or restarting your simulation from the
beginning each time there's a failure ?
- tom blackwell - u michigan
;
> It would be nice to know what exactly read.spss needs, though!
>
> Thanks again
>
> Jake
>
> On Tue, 4 Nov 2003, Thomas W Blackwell wrote:
>
> > Jake -
> >
> > The error message and warnign message shown below say something
> > is wrong with this
Jake -
The error message and warnign message shown below say something
is wrong with this file's SPSS system-file header. If you are
really able to open this one in SPSS, do so, change maybe a
column name or row name or two, and save it again under a
different file name. See if read.spss() cho
Is this a homework assignment ?
- tom blackwell - u michigan medical school - ann arbor -
On Tue, 4 Nov 2003, Feng Zhang wrote:
> Hey, R-listers
>
> When we say a function f(t) is smooth, does this mean that
> f has infinite differentials with respect to t?
>
> Or any other formal definit
Neil -
Maybe also the "Function and variable index", pages 94-96, and
the "Concept index", pages 97-98 in "An Introduction to R",
cran.r-project.org/doc/manuals/R-intro.pdf.
- tom blackwell - u michigan medical school - ann arbor -
On Tue, 4 Nov 2003, RINNER Heinrich wrote:
> The
Arne -
I have carried out exactly your example below, and I
get hc$merge as a matrix with two columns and 15 rows.
Do str(hc) to see a useful representation of the
contents of the returned list. help("hclust") describes
this list in the section "Value:". help("Subscript")
shows the various
Dear list -
I just discovered to my surprise that I cannot define
a function with an argument named 'break' or 'while'!
'breaks' is okay. Maybe this is no surprise to the R
developers.
R-1.7.1, 2003-06-16, i686-pc-linux-gnu.
- tom blackwell - u michigan medical school - ann arbor -
__
Use lm() or glm() with argument 'offset' set to
the value of the column whose coefficient must be 1.
See help("lm").
- tom blackwell - u michigan medical school - ann arbor -
On Wed, 29 Oct 2003, umeno wrote:
> Hi,
>
> I would like to know if anyone has any idea of how to run an OLS wi
Paul -
I think you have to have an executable copy of SAS on the
same machine as R in order for this to work. I've never
used it, but I remember a very similar question on the
list from just a few months ago. Maybe there's some
description of this in the foreign package manual, or in
the help p
Yu-Kang -
Simulations by their nature use randomly generated data.
Sometimes the random data doesn't contain enough information
to fully determine the parameter estimates for one iteration
or another. It seems likely that that is what happened here.
The design matrix is singular for one iteratio
Scott -
I agree with Spencer Graves that there's a scoping issue here:
Where does function Dk() pick up the values for n0 and w,
and does it get them from the SAME place when it's called from
inside FindLikelihood() as from outside ?
But more important is this one: All arithmetic on vect
Perhaps a much simpler method (just thought of it) would be to set
options(na.action="na.pass")
before you start. Or use na.action=na.pass() as an argument in
the call to model.frame(), since that's where the problem begins.
See help("na.omit"), help("model.frame").
- tom blackwell - u
I would re-expand the model matrix by indexing its (nobs) rows
with a longer vector (of length n) containing the correspondence.
If there is only one term (say "Z") in the formula which contains
the problematic NAs, I would do (roughly)
ff <- Y ~ Z# following the example in ?model.m
John -
My recollection is that Adrian Raftery's contributed package 'mclust'
does kernel density estimation as well. Not sure whether it does what
you need. Take a look at it on CRAN. Ah..I see that the description
which shows up on Jon Baron's search page is not encouraging. Give it
a try, a
Jeff -
The function obj() which you define below is just
a bit peculiar, since inside the function it assigns
attributes to an object 'obj' with the same name as
the *function* but which has not previously been
defined inside the function. Is this really what
you intended ? I'm not enough of
Mike -
For predicting class membership, I would use either lda() or
qda() from the MASS package. See the Venables and Ripley
book for detailed description of the methods. You'll have
to rely on your own references for what the 'SIMCA' algorithm
actually does. I've never heard of it. Sounds
Kenneth -
Using base package graphics, use plot() on the first call,
then either points() or lines() on subsequent calls to build
up a single plot, layer by layer. Each call can use an argument
col=... . However, the colors themselves are not transparent,
AFAIK, so that where two symbols
Greg -
I am puzzled that the total counts in table(qs2) and table(qs9)
could be different, if these are in fact two columns from the same
data frame. I'm guessing that there are NAs in one or both columns,
in addition to the digits 1,2,3,4, and that table() by default
does not show them. (
This is a question you should be able to answer from
the R web site, www.r-project.org.
- tom blackwell - u michigan medical school - ann arbor -
On Mon, 6 Oct 2003, Stefanie Chau wrote:
> I wish to install R on my computer but I do not
> know how to do this. I have a Windows ME.
> Please
On Mon, 6 Oct 2003, Tamas Papp wrote:
> I have a couple of (~200) 3x3 transition probability matrices (ie each
> defines a Markov chain). They are all estimated from the same
> underlying process, so it ie meaningful to take their elemetwise mean
> and standard deviation. [1]
>
> First question: s
Ann -
Some useful references are given in the help for each function.
Please DO READ the help.
- tom blackwell - u michigan medical school - ann arbor -
On Mon, 6 Oct 2003, Ann Devitt wrote:
> Hello,
> is there any documentation on doing principal components analysis with R
> besides the
Karim -
try function gam() in package mgcv.
library("mgcv")
help("gam")
- tom blackwell - u michigan medical school - ann arbor -
On Mon, 6 Oct 2003, Karim Elsawy wrote:
> I would like to fit a function H = F(x,y,z) but I do not know the
> analytical expression
> of H, is there a way
Crispin -
This is a familiar problem. The only way I know of to do it is:
result <- lapply(seq(along=list.a), function(i,a,b) do.it(a[[i]], b[[i]]), list.a,
list.b)
Here, do.it() is the function which operates on two elements.
I use this construction frequently.
- tom blackwell - u mich
Jens -
After reading Help("Surv"), yes, I think you have interpreted
the two required arguments to Surv() correctly. I don't know
of a ready-made function to do the transformation you illustrate.
If I had to program it myself, I would use diff(), rep() and
order().
- tom blackwell - u mic
Silika -
By far the best reference for the nlme package is the book by its
authors:
J.C. Pinheiro and D.M. Bates. Mixed effects models in S and Splus.
Springer, NY, 2000. ISBN (US) 0-387-989579. (There is a different,
European, ISBN number but my library catalog doesn't give it.)
This citati
nd not the actual observataions (which I don't have). However, that's
> not how 'x' is specified.
>
> Thank you again,
>
> Mårten
>
> - Original Message -
> From: "Thomas W Blackwell" <[EMAIL PROTECTED]>
> To: "Mårten Bjel
Marten -
I don't know exactly what interpretation you have in mind
for weights, but if you assign the value of hist() to a
variable tmp, you can then assign the component tmp$counts
any value you like, and plot the result as a histogram
using plot(tmp). See the section "Value:" in help("his
Arne -
In the past, I've used a data frame for the lookup table and
the "and" of individual logical vectors to select rows from it.
Here's a simplified version of the selector function I wrote.
My mail editor does not balance parentheses, so I don't guarantee
that this version is syntactically co
Will -
Take a look at Roger Koenker's package SparseMatrix,
available from CRAN. Look also for some other package
from Roger which depends on SparseMatrix, but has a
different name. It's a place to look. I don't recall
whether it will answer your need or not.
- tom blackwell - u michigan
Rajarshi -
Why not simply subscript your matrix X to return the rows and
columns you want to keep ? For example,
new <- X[16:176, c(3,5,7,9)]
assuming those are the rows and columns you want.
See help("Extract").
- tom blackwell - u michigan medical school - ann arbor -
On Tue, 30 Sep
Dave -
I'm not sure whether there is already a function which does
exactly what you want, because this is kind of a special case.
The functions I wold look at are: "by", "aggregate", "tapply",
"mapply", and, in the package "nlme" one I didn't know about
before called "gapply".
But, in your case,
Maintainers - I should have said I am running R 1.7-1 on
RedHat Linux 8.0. - tom blackwell - u michigan medical school -
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Ed -
You seem to have encountered a bug. I can reproduce Ed's difficulty
in a completely artificial example in which there are unused levels :
tmp <- factor(rep(seq(10), seq(10))) # length(tmp) # [1] 55
ave(seq(50), tmp[-seq(5)]) # gives NA in rows 32-50
I would consider th
Axel -
I believe that a function argument is not literally copied
until the first time it is modified within the function.
See email exchanges on this list from/to Ross Boylan within
the month of September for a more authoritative answer to
this question. (Do you know about the R-help archives a
Andreas -
help("postscript") says:
"Arguments: file: ... For use with 'onefile=FALSE'
give a 'printf' format such as `"Rplot%03d.ps"'
(the default in that case)."
The "%03d" will be replaced with a three digit number
in the actual file name. This allows postscript() to
generate a distin
Ben -
I think you want something like
new <- array(prod(hiaAry, probAry[,,,1], probAry[,,,2],
probAry[,,,3], probAry[,,,4]), dim(hiaAry))
But I'm just guessing.
- tom blackwell - u michigan medical school - ann arbor -
On Thu, 25 Sep 2003 [EMAIL PROTECTED] wrote:
> I am tryi
Michael -
new <- as.data.frame(lapply(data, function(x,p) rep(x,p), data[["frequency"]]))
This should do it. The first paragraph under "Details" in help("rep")
says what rep(x,p) is doing above. The rest is just hardware to apply
that to every column in your existing data frame, and turn t
Andy -
help("assign") says:
"Value: This function is invoked for its side effect, which is
assigning `value' to the variable `x'. ..."
Gosh. The help page isn't very specific about what the return
value of assign() IS, but it's not a named object. Your basic
strategy of assigning, writin
On Tue, 23 Sep 2003, Jaime Lopez Carvajal wrote:
> I need to apply discretization to my continuous data.
> Is there a method in R to do this?
See help("cut").
- tom blackwell - u michigan medical school - ann arbor -
__
[EMAIL PROTECTED] maili
Ruben -
Why not simply save(x, file="new.file.name") ?
See help("save"), help("files"). The file name must be
quoted, and it must be passed as a named argument to save().
- tom blackwell - u michigan medical school - ann arbor -
On Fri, 19 Sep 2003 [EMAIL PROTECTED] wrote:
> HI, i'
Eryk -
Question 1: Square brackets work, just the same as for
vectors, and return a (smaller or larger) list object.
The new thing with lists, not available (or needed) with
vectors, is double square brackets, which return one list
element as itself, not enclosed in a list.
See help("Subscript"
Rong -
I think you want the www.bioconductor.org site.
- tom blackwell - u michigan medical school - ann arbor -
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Perhaps MZodet wants the interactive, mouse controlled rotation
capability offered by ggobi ? Designed for linux
but advertises "better portability to Microsoft Windows".
I have no experience myself either installing or using this.
- tom blackwell - u michigan medical school - ann arbor -
On Tue, 16 Sep 2003, Peter Whiting wrote:
> It seems that predict removes rows with insufficient information
> (ie, if I replace "ALBANY" with NA and refactor everything works)
> - I wonder why it doesn't exhibit the same behavior when it
> encounters a new level - just eliminate the row and go
Peter -
Error !!
I forgot a "not" in the third line inside the function supported().
And, my mail editor doesn't balance parentheses, so I don't guarantee
that my code is even syntatically correct.
Corrected and re-named version of function:
unsupported <- function(i,y,d) {
result <- rep(F,
Peter -
Your subsequent email seems just right. You have to determine
ahead of time which rows can be estimated. Here's a strategy,
and possibly some code to implement it.
Let supported(i,y,d) be a user-written function which returns
a logical vector indicating rows which should be omitted f
Dear r-help -
I just noticed that in my R-1.7.1 on i386-pc-linux-gnu,
the page displayed by help("print") ends with the line
" ## Printing of factors illustrated for ex"
and then no more. It looks as though something got truncated
here. I think this is an R that I compiled from source o
Huan -
Look at the function code for order(). To show the function
definition, type just order at the command line (no quotes,
no parentheses). This example is what I found most useful
when I had a similar question. The green book is also useful.
- tom blackwell - u michigan medical schoo
Josh -
See the example "run a simulation" in help("try").
This won't be able to tell you the Spearman correlation
when there are fewer than two pairs of non-missing values,
but it will allow the loop to keep running. Caution: the
return value from try() will be a string with the error
messag
On Fri, 12 Sep 2003, Spencer Graves wrote:
> Have you considered:
>
> x <- Data[!is.na(Data[,n]), n]
>
> Does this do what you want? Vectors, arrays, and data.frame can be
> indexed by number or by a logical vector -- and by names if such are
> supplied. In this case, "!is.na(Data[,n])"
Ryan -
Puzzling. My best guess is a misspelling or a truncation
in the column name "intent" within latdata in the context of
> unlikely <- latdata[latdata$intent %in% c(1,2,3,4),]
but I do not see any such misspelling in your email. Could
you try again, using some other way to specify the col
WeiQiang -
As I read it, both difficulties arise on the DCOM side,
not in the R syntax. Problem 1, and I'm just guessing,
could arise if you are not allowed to overwrite the
value of "Result" in the DCOM environment. Try again,
using two different variable names in the two successive
lines.
Pr
Simplest is to save your workspace using save.image(),
then delete a bunch of large objects other than the data
frame that you want to export, and run write.table()
again, now that you've made space for it. A quick calc
shows 17000 x 400 x 8 = 55 Mb, and that's just the size
of the object that
Michael -
Because these columns are factors to begin with, using as.numeric()
alone will have unexpected results. See the section "Warning:" in
help("factor").
However, it is worth Murray asking himself WHY these columns are
factors to start with, rather than the expected numeric values.
One f
Murray -
Suppose your data frame is called mydata. If ALL of the columns were
factors with numeric levels, you could do:
newdata <- as.data.frame(lapply(mydata, function(x) as.numeric(as.character(x
(Sorry about the nested functions. I didn't invent these complications.)
When only the co
Bill -
Here's what I would do, starting after your display of anovaresults[[1]].
temp.1 <- unlist(lapply(anovaresults, function(x) { x["Pr(>F)"][1:3],] }))
temp.2 <- matrix(temp.1, length(anovaresults), 3, byrow=T)
dimnames(temp.2) <- list(names(anovaresults),
dimnames(
1 - 100 of 167 matches
Mail list logo