-01)+c(2,4,4,6)),
labels=list(letters[1:4]
shows labels a, b, c
Since this results in label c being placed at position 6, not 4, I
feel this is a bug.
-Alex Brown
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r
Hi George
I'm running ubuntu dapper badger with 2.4.0.
add the line
deb http://cran.R-project.org/bin/linux/ubuntu dapper/
to your /etc/apt/sources.list
-Alex Brown
On 13 Dec 2006, at 02:20, George Nachman wrote:
Thanks, everyone, for the help!
Bill:
This looks like a really
causes the same error, with a different situation.
Q = data.frame(X=c(NaN, 1), Y=factor(letters[1:2], letters[1:2]))
barchart(~ X, Q, groups=Y)
-Alex Brown
panel.barchart.fixed =
function (x, y, box.ratio = 1, horizontal = TRUE, origin = NULL,
reference = TRUE, stack = FALSE, groups = NULL, col
Z for
different parameter Y where some Y are missing.
alternative version:
E = data.frame(X=c(1,2,3,4), Y=letters[c(1,2,1,2)], Z=letters[c
(7,7,8,9)]);
barchart(~ X | Z, E, groups=Y)
I have updated to 2.4.0 and lattice 0.14-16 and the problem still
exists.
-Alex Brown
that,
someone will be able to come up with a simple solution.
-Alex Brown
On 1 Dec 2006, at 15:22, Hans-Juergen Eickelmann wrote:
Dear R-community,
I started using R to control yield and output from different
factories by
production week. A typical example is below.
LocationWeek
install with the following libraries:
DBI_0.1-11.tar.gz RMySQL_0.5-10.tar.gz
installed in a custom library location /export/downloads/R/packages
(normal location seems to behave the same)
note: it also failed on 2.3.0 on this machine
--Alex Brown
On 23 Oct 2006, at 23:52, Deepayan Sarkar wrote:
On 10/23/06, Alex Brown [EMAIL PROTECTED] wrote:
Can anyone explain why the key is inverted versus the bar
order?
Because the key goes from top to bottom, while cartesian
coordinates
go from bottom to top. Neither can
Try the summary function, which pretty much does exactly that.
-Alex
On 20 Oct 2006, at 23:44, Jonathan Greenberg wrote:
Is there a way to calculate, say, the mean, min and max using
aggregate
using one line of code? Or do I need to call them separately (e.g.
aggregate(...,mean);
$V4, data$V5)
...
-Alex Brown
On 24 Oct 2006, at 05:40, Hu Chen wrote:
No, I am not concerning the cat. Sorry for my misleading.
another example:
I have a data frame.
data$V4 returns:
.
[6936] P05796 P11096 P76174 P04475 P18775
[6941] P33225 P76387
formulae. I would have used the following formulation:
ex2 = stack(example)
ex3 = cbind(country=rep(rownames(example),2),ex2)
barchart(country ~ values, ex3,group=ind, auto.key=TRUE)
-Alex Brown
On 22 Oct 2006, at 12:21, Geoff Russell wrote:
Hi,
I seem to have a key colour
+ imagemagick, although it does not come with the
standard R distribution - you will have to get it from CRAN, and I
don't personally think the output is as nice, so far (although it has
the potential to be better).
-Alex Brown
On 23 Oct 2006, at 14:29, lidaof wrote:
Hi,
Thank you
very pleased to have the power of
auto.key in lattice - it's the main reason why I stopped using the
default plot function.
-Alex Brown
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
There are a number of ways this might be approached.
Can you please give a sample of your data, and your desired output?
Are 5a ... 5e the only values that appear in that column, or are
there other values, 4e for instance, that should stay the same
during your conversion?
Do you wish to use
, and show exactly what you mean
by row and column sums? Does the order of row and column sums have
to stay the same, ie:
is
0 1
0 0
symmetric with
1 0
0 0
or not?
-Alex Brown
On 19 Oct 2006, at 20:49, Guenther, Cameron wrote:
Hello
similar
* lattice - it has multiple graphs, but I think they may need to be
homogeneous
* plot + lines
* plot + plot
And here is the solution I am using at the moment, based upon layout.
Can anyone suggest a better way to do this?
-Alex Brown
# some
I can't quite tell what you are looking for, but try the following:
measurecols = c(val1,val2)
df2 - df[!apply(is.na(df[1:nrow(df),measuredcols]),1,all),]
to remove rows which have no measurements in.
a simple count of the rows (nrow) will then give you the number of
animals that didn't die,
)
-Alex Brown
On 18 Oct 2006, at 23:24, Jeffrey Stratford wrote:
Hi. I'm trying to plot the ratio of used versus unused bird houses
(coded 1 or 0) versus a continuous environmental gradient
(proportion of
urban cover [purban2]) that I would like to convert into bins (0 -
0.25, 0.26 - 0.5
..
..
..
I now would like to save the results in a pdf-file in the same
format as above and add one or two plots.
In R the results are written in a data frame.
Franco Mendolia
Original-Nachricht
Von: Alex Brown
On 17 Oct 2006, at 18:34, Alberto Monteiro wrote:
Jenny Stadt wrote:
I was not able to make this work. I know it is a simple one, sorry
to bother. Give me some hints pls. Thanks!
Are you a C programmer? :-)
if(length(real.d)=30 length(real.b)=30
beta1*beta2*theta1*theta20 )
{ r - 1;
I thought at first that you could use a weighted sample (the sample
function) but, you can't since it doesn't take proper account of
replacement if you try that.
You can use the list approach, but through the power of R, you don't
need a lot of loops to do it...
I can't speak for the
First, here's the specific bug I have. Later I'll say why I care.
ls(zappo)
Error in try(name) : object zappo not found
# good.
f = function(zappo) { function(y) zappo + y }
g = f(1)
g(1)
[1] 2
formals(g)
$y
formals(g)$y
formals(g)$y = 2
g
function (y = 2)
zappo + y
g(1)
Ah, it's fixed in 2.4.0. I'll work around it.
-Alex
On 13 Oct 2006, at 11:19, Alex Brown wrote:
First, here's the specific bug I have. Later I'll say why I care.
ls(zappo)
Error in try(name) : object zappo not found
# good.
f = function(zappo) { function(y) zappo + y }
g = f(1)
g(1
apply(Y, 2, function(y)list(y*X))
On 13 Oct 2006, at 12:33, Majid Iravani wrote:
Dear all,
I would like to multiply two matrixes with the different dimension
column
by column. Let make an example:
If I have two matrixes X and Yas follow:
X- matrix(1:12, nrow=4, ncol=3,
A cheeky solution by subverting the coerce mechanism and read.table:
# install a coerce function which can fix the e+10 syntax for an
imaginary class myDouble:
setAs(character, myDouble, function(from)as.double(sub('^(-?)
e','\\11e',from)))
Warning message:
in the method signature for
note: this e-mail is supposed to precede my coerce hack one.
As an example of the other posters mentioning colClasses, with some
debugging notes:
# create a pretend file for this example
Lines - scan(sep=\n, what=)
a 1 3e-8
b 2 1e+10
c 3 e-10
d 4 e+3
file - textConnection(Lines)
#
You can do it directly from the X matrix like so:
by(X, as.list(as.data.frame(X[,3:5])), function(R)weighted.mean(R
[1], R[2]))
A: 0
B: 0
C: 0
[1] 0.4912458
A: 1
B: 0
C: 0
[1] NA
Solution:
m[rep(1:nrow(m),each=2),]
Explanation:
There is a simple and effective way to do this, using array slices.
for your input matrix, m:
m=matrix(paste(a,c(11,12,21,22),sep=),2)
m
[,1] [,2]
[1,] a11 a21
[2,] a12 a22
you want to create
[,1] [,2]
[1,] a11 a21
[2,] a11
the gui
interface:
http://cran.r-project.org/bin/macosx/R-2.3.1.dmg
-Alex Brown
On 29 Sep 2006, at 08:04, Ingo wrote:
Dear R-help team,
I am trying to run R on my Intel-based Mac. I have installed R,
X11 and Tcl/TK (I thought), but the GUI doesn't run. My system
administrator doesn't
Hi All
The device commands pdf and postscript allow you to specify the width
and height of a page. However, each subsequent plot is drawn on a
separate page. Is there a way to change the page size part way through?
For instance, is there an equivalent to the function pdfresize below?
is allocated beneath the graph for
the legend
4) draw legend
5) allow user to call plot, correctly drawing the plot in the remaining
frame?
I have taken a look at this, but I am confused by the different units
used by par(mar), legend(plot=F), and layout.
-Alex Brown
30 matches
Mail list logo