Dear Prof. Lang -
I am trying to install the XML library on a 64-bit SUSE linux system
(version info below) running 2.4.1.
I have gcc version 3.3.3, and libxml2 version 2.6.7. I know this is not
current, but I'm on a machine used and administered by others, and
updating libxml2 would require
PM
To: Wiener, Matthew
Cc: R-help
Subject: Re: [R] Trouble compiling XML package [Broadcast]
Wiener, Matthew wrote:
Dear Prof. Lang -
I am trying to install the XML library on a 64-bit SUSE linux system
(version info below) running 2.4.1.
I have gcc version 3.3.3, and libxml2 version
Take a look at table.
Hope this helps,
Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of bunny ,
lautloscrew.com
Sent: Thursday, March 01, 2007 9:20 AM
To: r-help@stat.math.ethz.ch
Subject: [R] count the # of appearances... [Broadcast]
Hi there,
is
You didn't' actually tell us what forfact is. You could try something like
(untested)
My.matrix - my.matrix[!(my.matrix[, 1] %in% remove.values), , drop = FALSE]
Also, reading some of the introductory R manuals you can find on CRAN in the
documentation section will really give you a leg up on
The function rle will give you what you are looking for.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Becker
Sent: Thursday, February 15, 2007 5:52 AM
To: Samuel Kemp
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R]
From the documentation for xyplot (referred to from densityplot):
The position of the key can be controlled in either of two possible
ways. If a component called space is present, the key is positioned
outside the plot region, in one of the four sides, determined by the
value of space, which can
In traditional R graphics, you can take a look at matplot.
You might also want to look at the lattice package.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Maria
Vatapitakapha
Sent: Tuesday, February 13, 2007 12:20 PM
Hi. The package you are looking for is not a standard package (that is,
one that gets installed automatically with R).
There is documentation available, though. From cran
(http://cran.r-project.org), go to manuals, look at R Installation and
Administration, particularly Section 6, which talks
You can indeed compile and run R directly through the unix layer in Mac
OS (or at least you could about 2 years ago, which was the last time I
tried).
Regards,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold
Sent: Tuesday,
I've had good luck with Rserve. http://stats.math.uni-augsburg.de/Rserve/
Hope this helps,
Matt
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of fuad
Sent: Tuesday, October 10, 2006 9:58 PM
To: R-help@stat.math.ethz.ch
Subject: [R] Accessing R from Java
This is FAQ 7.22. Lattice functions produce graphic objects, which are not
displayed by default. If you print your graph, you should be fine. Also,
take a look at the documentation for panel.xyplot. Using type = c(p, r)
should make things simpler.
Regards,
Matt Wiener
-Original
We have successfully used Rserve: http://stats.math.uni-augsburg.de/Rserve/
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lu Yuefeng
Sent: Thursday, August 31, 2006 1:24 PM
To: r-help@stat.math.ethz.ch
Subject: [R] java
It's the |source in your formula that tells lattice to separate them.
If you drop that, you'll get all points without S and P distinguished at
all. If you add a groups argument, you should get them presented with
different colors/symbols/etc. depending on your trellis settings (warning:
untested
This means that the margins for 10 screens would take up more room than you
have - essentially the plot area is being squeezed to nothing. You can try
reducing your margins using par.
Also, it looks like you're trying to split into 20 screens there.
Hope this helps,
Matt
-Original
We had something similar, and as far as I recall the problem turned out to
be that we had not set the config file to allow remote connections.
This would probably be better put on the Rosuda mailing list:
http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel
Hope this helps,
I wrote some code to do this. It only works with 2 groups (that's all I
needed), but could probably be generalized. It got my graph made, and I
haven't needed a graph like this one again, so I never went back to really
clean it up.
It works by first plotting both sets of rectangles, then going
Use drop = FALSE in your subscripting calls. That will retain matrixness.
For example:
y - matrix(1:8, ncol = 2)
is.matrix(y[-c(1,2,3),,drop = FALSE]
More info is on the help page for [. You can type: ?[ to get it from
the command line.
Hope this helps,
Matt Wiener
-Original
Take a look at trellis.par.set().
For example, trellis.par.set(theme = col.whitebg()) changes things to look
more or less like the default from the standard R graphics functions. But
you can change one option at a time too.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL
interaction(A, B) will create a single factor made up of the combinations of
the two factors A and B. Perhaps that would let you use plotmeans.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Evgeniy Kachalin
Sent:
You can also look at xyplot in the lattice package. You will have to set up
your data slightly differently than for the standard graphics package, but
it may well be worth learning to do so. The lattice package has enormous
flexibility for combining multiple sets of data in one panel or plotting
See xlim and ylim in the documentation on the plot command.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Miller
Sent: Monday, November 07, 2005 10:12 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Scale of plots
I
It's randomForest.
Searching (simple text find) on the packages web page of CRAN using either
random or forest would find you this.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Louis Ferre
Sent: Tuesday, September 27,
This is not a direct answer to your question. But Rserve
(http://stats.math.uni-augsburg.de/Rserve/) provides another possible
approach. We've had good success with it.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Depending on the size of your objects, you may be able to just keep them in
a list, especially as you say you will need them in the same order later.
If because of memory constraints or for some other reason you really need to
have a separate file for each round, you can generate object and file
I think this message from the help archives might address your question
(found using the query lattice mtext on R site search:
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/51605.html.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
I think you might be able to use the horizontal argument to lattice to
rotate all your plots and squish them in the other dimension. (Though I
don't know whether you consider that a good outcome ...)
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
You can use the breaks argument in image to do this. (You don't specify a
function you're using, but other heatmap functions probably have a similar
parameter.) Look across all your data, figure out the ranges you want to
have different colors, and specify the appropriate break points in each
mean?
HTH,
Matt
-Original Message-
From: Jake Michaelson [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 21, 2005 10:45 AM
To: Wiener, Matthew
Cc: R-help@stat.math.ethz.ch
Subject: Re: [R] heatmap color distribution
Thanks for the reply. As I understand it, breaks only controls
This does not address the question of how to do this the way you're trying
to do it, using Omegahat. But I've had good results using Simon Urbanek's
program Rserve: http://stats.math.uni-augsburg.de/Rserve/
Hope this helps,
Matthew Wiener
Applied Computer Science Mathematics
Merck Research
To leave x with only the non-negative elements, you can use x[x = 0]. Also
see the function subset.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Hopkins
Sent: Friday, July 15, 2005 8:00 AM
To:
Federico -
match will give you the (first) index of each element of its first
argument in its second argument. So match(vector.1, vector.2) tells you
where each element of vector.1 appears in vector.2. So if you use table
on that vector, you'll see how many times each element of vector.2
The which.max solution is fine as long as the maximum is always unique.
Otherwise, which.max will give you the first maximum.
So using the x == max(x) version will have an advantage if there can be
ties.
Regards,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
In traditional, or base graphics, see matplot, which does exactly what
you describe.
You can also look at lattice graphics, which will give you flexibility to
plot in a single panel or multiple panels.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
(a) If what you're trying to do is just apply exp, or any other element-wise
function, you can just say exp(mtx). You avoid both apply and the
transpose, and save time in the bargain. If your actual function really
does depend on multiple elements, it may be a little more complicated. You
could
Christoph --
There was just a thread on this earlier this week. You can search in the
archives for the title: refitting lm() with same x, different y.
(Actually, it doesn't turn up in the R site search yet, at least for me.
But if you just go to the archive of recent messages, available
Shawn --
You can do this by re-using numbers in the layout matrix. The examples in
the help for layout have several examples of this.
For this particular example, I think that layout(cbind(c(1,1), c(2,3)))
would probably do it (untested).
Hope this helps,
Matt Wiener
-Original
Ravi --
If you use table on a factor, you'll get 0's if appropriate:
table(sample(1:5, 10, replace = TRUE)) #no 2's, by chance
1 3 4 5
3 1 2 4
table(sample(1:5, 20, replace = TRUE)) # no 6's here, so 6 doesn't show
up
1 2 3 4 5
3 5 2 5 5
## now make it a factor, and you get 0 3's and
Ken -- try using lists:
vec.list - list(1:5, 2:4, 3:8)
vec.list - c(vec.list, list(7:9))
vec.list
[[1]]
[1] 1 2 3 4 5
[[2]]
[1] 2 3 4
[[3]]
[1] 3 4 5 6 7 8
[[4]]
[1] 7 8 9
Then you can use lapply or sapply, or just a for loop, to iterate over
the list, applying your function to each
Couldn't you do this by subtracting 0.5 + x from your y values and checking
for normality with mean 0 and sd = 1 (using ks.test or another test of
normality).
If you fail, you'll have to do additional work to find out whether pairs
with some particular x value (or range of x values) is causing
I have used the R statistical computing environment.
No-one has ever asked me to change it, but maybe someone else has something
better.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin
Sent: Friday, April 01,
I have had my best luck by re-parametrizing so that I no longer needed
restrictions. For example, if parameters must be positive, then I optimize
over parameters in log space, taking the exponential within my function.
This requires small changes to the function I'm optimizing (and the
gradient,
From the help for cor (from the stats package):
If x and y are matrices then the covariances (or correlations) between the
columns of x and the columns of y are computed.
So if you make a matrix with each column corresponding to one of your
variables, you can get what you're after.
For future
It looks like you have missing observations. With the use argument, you
can specify complete observations or pairwise-complete observations.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jessica Higgs
Sent: Monday,
On the first issue, there's a recent post you can find in the archives.
It's from Deepayan Sarkar on January 2 this year. It would probably pop up
on a search for black white lattice or something similar.
The key part of his answer:
I'd do something like this as part of the initialization:
...
Roger --
First, if you have the data frames in a list already, you can just use
those; no need to bother with the names. If the data frames are all
separate, but you have the names, you can first create a list of the data
frames themselves:
do.call(rbind, lapply(mlist, get)) # assumes they're
Kurt --
If you create a vector of alignment positions, you should be able to do
alignment.pos - rep(1:236, each = 72)
table(data.frame(as.vector(align1), alignment.pos))
You may want to coerce align1 to a factor with appropriate levels, in case
you are missing some amino acids. Otherwise
Michael --
is.na works on the full matrix. The commands below construct a matrix,
insert some NA's, and then convert them all to 0.
temp1 - matrix(runif(25), 5, 5)
temp1[temp1 0.1] - NA
temp1[is.na(temp1)] - 0
Hope this helps.
Regards,
Matt Wiener
-Original Message-
From:
It sounds like clara in package cluster might help.
Regards,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Bolser
Sent: Wednesday, December 15, 2004 6:37 AM
To: R mailing list
Subject: [R] Massive clustering job?
Hi,
I have
Alexander --
a[!(a %in% b)] should do the trick.
setdiff could also probably be used.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alexander Sokol
Sent: Thursday, November 11, 2004 8:34 AM
To: [EMAIL PROTECTED]
Subject:
Sean --
You want do.call(rbind, your.list.of.data.frames). do.call is helpful in
a lot of situations when you want to construct a list of arguments and then
apply a function.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Dean --
I believe just setting log = y in your plot command should do this.
For example:
plot(runif(100, 1, 100), runif(100, 1, 100), log = xy)
gives me tick marks at 2, 5, 10, 20, 50, and 100. (YMMV because of the
random numbers.)
Hope this helps,
Matt Wiener
-Original Message-
When you think there should be new links, or can offer an example you think
would be clearer, it might be worth submitting a documentation modification
proposal (through the bug tracking link on the R home page, for example).
That would improve the basic documentation, which is what most people
letters[1;4]
LETTERS[1:4] for capitals.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, September 07, 2004 8:42 PM
To: [EMAIL PROTECTED]
Subject: [R] a little question about R
Hello,sir:
Take a look at do.call.
In your case, 'do.call(cbind, cc)' should work.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luis Rideau Cruz
Sent: Friday, August 27, 2004 9:12 AM
To: [EMAIL PROTECTED]
Subject: [R] for (i in
Does oneway.test do what you want?
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sven Hartenstein
Sent: Monday, June 21, 2004 3:23 PM
To: [EMAIL PROTECTED]
Subject: [R] Welch-JM-Test or Brown-Forsythe-Test in R?
Hi,
I
Christian --
This is not a bug, but a feature, and the dot is not the issue here. R uses
partial argument matching on function arguments.
So:
f - function(foobar = 0){print(foobar)}
f
function(foobar = 0){print(foobar)}
f(fo=1)
[1] 1
f(foo=1)
[1] 1
f(foob=1)
[1] 1
f(fooba=1)
[1] 1
Ivo --
The stopifnot statement can be used to do this sort of check. For
example, if you need to check that one of your arguments is a vector with
length = N, you can add
stopifnot(is.vector(myarg))
stopifnot(length(myarg) = N)
To the beginning of your function. This will throw an error if
All --
I am trying to combine trellis plots and having a couple of small problems.
I'm trying to combine two trellis plots that display data of different
kinds. Each has a single row of plots, and I'd like to display them over
one another. So I use
print(plot1, split = c(1,1,2,1), more =
The seek command will allow you to skip to a particular byte position in
the file. You can define the position you want relative to your current
position, or to the start of the file.
Hope this helps,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Christian --
You don't provide enough information (like a call) to answer this. I
suspect, though, that you may be subsetting in a way that passes
randomForest no data.
I'm not aware offhand of an easy way to get this error from randomForest. I
tried creating some data superficially similar
If you know that the line should pass through (0,0), would it make sense to
do a regression without an intercept? You can do that by putting -1 in
the formula, like: lm(y ~ x - 1).
Hope this helps,
Matt
Matthew Wiener
RY84-202
Applied Computer Science Mathematics Dept.
Merck Research Labs
It looks like image_and_label has only 2 columns, so when you take
img_and_label[,2] you have a vector left. Even if that weren't the case,
you're going to need to pass in both the gray scale points and labels,
presumably in a data frame. You've created a character matrix below, so
you're just
R-helpers --
Has anyone gotten R to compile as a 64-bit application on AIX 5L (or any
other version)?
(I don't have the details of the errors here, as I'm not the person actually
doing the compiling. I might be able to get them if someone wants to see
them in particular.)
Thanks for any help.
c(x,y) will do it.
Hope this helps -Matt
-Original Message-
From: Axel Benz [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 8:57 AM
To: [EMAIL PROTECTED]
Subject: [R] newby problem - concatenate lists
Hi,
a very basic question:
What ist the easiest way in R to concatenate
Hi, all.
I would like to use pipe to run a file through an awk program before
scanning (to reduce the amount of data I'll be taking in). I would like to
construct the awk program in R, and also to be able to set the awk variable
FS, to accommodate different field separators in different files.
Hi.
There is no reason the variance of a normal should decrease as you take
larger samples. Indeed, in your call itself, you say that you want a sample
from a normal with a standard deviation of 3, and so a variance of 9. As
expected, both of your estimates of variance are close to 9.
What
Perhaps you should read one of the introductory manuals in the Contributed
Documentation section of cran.us.r-project.org. This will introduce many
of the basic commands, and save you time and frustration.
You will probably end up wanting to use either read.table or scan to get
your data into R.
You can also take a look at ecdf in the stepfun package.
Hope this helps,
Matt
-Original Message-
From: Spencer Graves [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 2:39 PM
To: Tommy E. Cathey
Cc: [EMAIL PROTECTED]
Subject: Re: [R] cumulative frequency distribution plot
The collapse argument does what you want:
x - c(Bob, loves, Sally)
paste(c, collapse = )
Hope this helps,
Matt Wiener
-Original Message-
From: John Miyamoto [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 6:54 PM
To: R discussion group
Subject: [R] Combining the components
Take a look at ecdf in package stepfun.
-Original Message-
From: DED (David George Edwards) [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 6:20 AM
To: '[EMAIL PROTECTED]'
Subject: [R] cdf function: inverse to quantile?
Is there a function in R for calculating empirical
One other option.
I usually find that when I do the chisq.test with exact p-value calculation,
I find the p-values are nearly identical to the results when I use the
approximation and get the warnings (I'm usually dealing with just a few bins
with less than 5, and many bins with more than 5).
So
As Brian Ripley pointed out in a recent post, you can just give g() its own
... argument.
Regards,
Matt Wiener
-Original Message-
From: Liaw, Andy [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 3:37 PM
To: '[EMAIL PROTECTED]'
Subject: [R] manipulating ... inside a function
You can save some time by generating all your samples at one time:
t1 - matrix(rnorm(5 * n, 100, 10), nc = n)
apply(t1, 2, mean)
(Or use colVars and colMeans to save even more time)
Hope this helps,
Matt Wiener
-Original Message-
From: Cheryl H. [mailto:[EMAIL PROTECTED]
Sent:
Take a look at package mgcv. Hope this helps. --Matt
-Original Message-
From: RenE J.V. Bertin [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 1:39 PM
To: [EMAIL PROTECTED]
Subject: [R] multidimensional function fitting
Hello,
I have been looking around for how to perform
cut returns a factor. Try something like
t1 - cut(data.vector, breaks = my.breaks, labels = my.label)
as.numeric(as.character(t1))
This is an issue that comes up frequently with factor. Take a look at the
help page for factor for some warnings.
Hope this helps,
Matt Wiener
-Original
75 matches
Mail list logo