Hi!!
I've had some problems with the new version of textplot, included in the
gplots package. (some kind of postscript problem)
I wonder if any of you have used this function or if there is any other R
funcion to show the text in a R object as an image.
Thanks in advance,
Hi all,
Suppose I have the following matrix which is a constant matrix I've copied
from some other document:
1.2 3.4 1.4 ...
2.3 3.7 2.6 ...
...
How do I make it into a matrix or array in R?
What is the fastest way of initializing a constant matrix with this
copy/pasted values?
Thanks a
Hello,
I have a data set on which I run the sammon algorithm as follows:
library(MASS)
data = read.table('problemforr.dat')
y = cmdscale(data, add=TRUE)
s = sammon(data, y$points)
(In case it should be relevant, I make the data available at
http://idi.ntnu.no/~edsberg/problemforr.dat)
With R
Sorry Michael, but I don't understand your question.
If you want to intialize a constant matrix (there is not such thing in
R, just create a numerical matrix and use it without changing its
values), you just use matrix(). For help and arguments of the function,
type:
?matrix
Best,
Philippe
Suppose I have the following matrix which is a constant matrix I've copied
from some other document:
1.2 3.4 1.4 ...
2.3 3.7 2.6 ...
...
How do I make it into a matrix or array in R?
What is the fastest way of initializing a constant matrix with this
copy/pasted values?
you cannot just
Hi List,
I have a time series of 122 values, actualy it is a time series of daily
indian monsoon rainfall. now i want to filter this time series for a particular
oscilation say 10 to 20days oscilation. i want to find out what amount of
variance is explained by this mode. Which package is
Dear R-helpers,
I'm trying to develop a function which specifies all possible expressions that
can be formed using a certain number of variables. For example, with three
variables A, B and C we can have
- presence/absence of A; B and C
- presence/absence of combinations of two of them
-
Hello,
Here comes a simple question:
Is there a way of obtaining more than one histogram in the graph-window so
you can edit all the plots simultaneously?
and how about scatter plots?
Thanks in advance
__
R-help@stat.math.ethz.ch mailing list
Adrian DUSA adi at roda.ro writes:
I'm trying to develop a function [...snip...]
Sorry for the traffic, I forgot to say that I'm using
library(combinat)
for the combn function...
Thank you,
Adrian
__
R-help@stat.math.ethz.ch mailing list
this looks similar:
do.call(expand.grid,split(t(replicate(3,c(0,1,NA))),1:3))
Adrian DUSA a écrit :
Dear R-helpers,
I'm trying to develop a function which specifies all possible expressions that
can be formed using a certain number of variables. For example, with three
variables A, B and C
See
?par
Look for arguments
mfrow and mfcol
Hope this is what you are looking for,
Ales Ziberna
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of R Granell, Medicine
Sent: Monday, January 30, 2006 12:35 PM
To: r-help@stat.math.ethz.ch
Subject: [R]
Hello,
Not exactly the same. By the way, why do you use do.call()? Couldn't you
do simply:
expand.grid(split(t(replicate(3, c(0, 1, NA))), 1:3))
Best,
Philippe Grosjean
Jacques VESLOT wrote:
this looks similar:
do.call(expand.grid,split(t(replicate(3,c(0,1,NA))),1:3))
Adrian DUSA a
Dear expeRts!
I'm thinking of buying a new computer and am considering dual-core
processors, such as AMD Athlon64 X2. Since I'm not a computer expert, pleas
forgive me if some of my questions are silly.
First, am I correct that using a dual-core processor is (for R point of
view) the same as
Yes, you are right, and you found some relevant posts.
Uwe Ligges
Aleš Žiberna wrote:
Dear expeRts!
I'm thinking of buying a new computer and am considering dual-core
processors, such as AMD Athlon64 X2. Since I'm not a computer expert, pleas
forgive me if some of my questions are silly.
On Mon, 30 Jan 2006, Ole Edsberg wrote:
Hello,
I have a data set on which I run the sammon algorithm as follows:
library(MASS)
data = read.table('problemforr.dat')
Hmm. This is a data frame of 387 rows and 387 columns and Euclidean
distance is used. Squeezing 387 dims (and PCA shows
Hello R-users
I am new to R and trying to write some functions. I have problems writing
functions that takes a data set as an arguement and uses variables in the data.
I illustrate my problem with a small example below:
sample data #--
visual24-rnorm(30,3,5)
You didn't say if you did the selection from the menu or the command line...
In any case, the menu `Packages' - `Set CRAN Mirror...' runs the command
chooseCRANmirror(), which looks like
chooseCRANmirror
function (graphics = TRUE)
{
if (!interactive())
stop(cannot choose a CRAN
Hi
Well, colClesses can be used for what you want to do. See
test-read.table(c:/temp/test.txt,
colClasses=c(character,numeric, character, factor))
str(test)
`data.frame': 10 obs. of 3 variables:
$ doba : num 189 256 286 105 272 45 29.5 43 68.5 99
$ otac : chr 0.6 0.6 0.6 1.2 ...
$
What is wrong with your first solution:
st -function(x,y){
## y ... Response
## x ... terms
rcc-coef(lm(y ~ x))
plot(x,y)
abline(rcc[1],rcc[2])
}
st(dats$visual24,dats$visual52)
Or use attach:
st -function(data,x,y){
attach(data)
rcc-coef(lm(x~y))
plot(x,y)
# Here it is (using the formula interface):
dats - data.frame(visual24 = rnorm(30, 3, 5),
visual52 = rt(30, 7))
st - function(formula, data, ...) {
# Just use the formula to specify which variables to use
rcc - coef(lm(formula, data))
# Make sure to
st - function(data, x, y){
attach(data)
rcc - coef(lm(y~x))
plot(x,y)
abline(rcc)
detach(data)}
st(data=dats, x=visual24, y=visual52)
Pryseley Assam a écrit :
Hello R-users
I am new to R and trying to write some functions. I have problems writing
functions that
Hi
On 29 Jan 2006 at 17:28, Gabor Grothendieck wrote:
Date sent: Sun, 29 Jan 2006 17:28:29 -0500
From: Gabor Grothendieck [EMAIL PROTECTED]
To: Michael [EMAIL PROTECTED]
Copies to: R-help@stat.math.ethz.ch
Subject:
I hope I'm not making your life unnecessarily difficult. As I will
demonstrate below my signature, my original straight application of
lme4_0.995-2/Matrix_0.995-4 is failing without providing any
optimization information. For reference, I've provided optimization
output from
This might be a bit closer to what Pryseley wanted:
st - function(dat, x, y) {
f - formula(substitute(y ~ x), env=environment(dat))
plot(f, dat)
abline(lm(f, dat))
}
Note that the variable names in the plot when tested on `dats' as Pryseley
created.
Andy
From: Jacques VESLOT
st
sorry if it has already been discussed but i can't understand this:
seq(0.1,1,by=0.1)
[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
match(0.1,seq(0.1,1,by=0.1))
[1] 1
match(0.2,seq(0.1,1,by=0.1))
[1] 2
match(0.3,seq(0.1,1,by=0.1))
[1] NA
match(0.4,seq(0.1,1,by=0.1))
[1] 4
R.version
Thanks Charles.
The error is occuring in a fit of a glm using the fixed-effects terms
only. This fit provides the starting estimates for the fixed effects
in the GLMM model. I changed the way that this fit is performed and
apparently didn't do it correctly.
I think it would be better if you
Hope this is clear:
x - seq(0.1, 1, by=0.1)
0.3 == x[3]
[1] FALSE
abs(0.3 - x[3])
[1] 5.551115e-17
Andy
From: Jacques VESLOT
sorry if it has already been discussed but i can't understand this:
seq(0.1,1,by=0.1)
[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
the problem is in
0.3 == seq(0.1,1,by=0.1)[3]
versus
all.equal(0.3, seq(0.1,1,by=0.1)[3])
look at ?Comparison for more info.
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address:
On Mon, 30 Jan 2006, [iso-8859-2] Alea }iberna wrote:
Dear expeRts!
I'm thinking of buying a new computer and am considering dual-core
processors, such as AMD Athlon64 X2. Since I'm not a computer expert, pleas
forgive me if some of my questions are silly.
First, am I correct that using a
On Mon, 30 Jan 2006, Jacques VESLOT wrote:
sorry if it has already been discussed but i can't understand this:
seq(0.1,1,by=0.1)
[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
match(0.1,seq(0.1,1,by=0.1))
[1] 1
match(0.2,seq(0.1,1,by=0.1))
[1] 2
match(0.3,seq(0.1,1,by=0.1))
[1]
On 29 Jan 2006, [EMAIL PROTECTED] wrote:
On Sun, 29 Jan 2006, Elizabeth Purdom wrote:
I came across the following behavior, which seems illogical to me.
What did you expect and why?
I don't know if it is a bug or if I'm missing something:
all(logical(0))
[1] TRUE
All the values are
Do you mean they are in the clipboard in the format shown?
If that is the case then do this:
as.matrix(read.table(clipboard))
On 1/30/06, Michael [EMAIL PROTECTED] wrote:
Hi all,
Suppose I have the following matrix which is a constant matrix I've copied
from some other document:
1.2
On 1/29/06, context grey [EMAIL PROTECTED] wrote:
Hi,
Is there something like a hashtable or (python)
dictionary in R/Splus?
On 29 Jan 2006, [EMAIL PROTECTED] wrote:
use a 'list':
Most of the time, a list will be what you want, but it has some
important differences from a Python
Is a list O(1) for setting and getting?
Can you elaborate? R is a vector language, and normally you create a list
in one pass, and you can retrieve multiple elements at once.
When you use a hash table you expect it to be O(1) (on average) for
getting and setting values (conditional on
I thought all the values are false, all none of them, because there
aren't any that are true:
any(logical(0))
[1] FALSE
This is for the same reason why a product over an empty set of
factors is 1, and a sum over an empty set of terms is 0.
GP
--
hi,
i am new here and wanted to know, before i start learning yet another
statistical package:
I want to estimate a system of equations that is non linear in the parameters,
using 3SLS. However, i will probably have to constrain some of the parameters
to be between, say, zero and one. Is
On 1/30/2006 9:55 AM, Seth Falcon wrote:
On 1/29/06, context grey [EMAIL PROTECTED] wrote:
Hi,
Is there something like a hashtable or (python)
dictionary in R/Splus?
On 29 Jan 2006, [EMAIL PROTECTED] wrote:
use a 'list':
Most of the time, a list will be what you want, but it has some
Seth Falcon wrote:
On 29 Jan 2006, [EMAIL PROTECTED] wrote:
On Sun, 29 Jan 2006, Elizabeth Purdom wrote:
I came across the following behavior, which seems illogical to me.
What did you expect and why?
I don't know if it is a bug or if I'm missing something:
all(logical(0))
[1] TRUE
Aleš Žiberna ales.ziberna at gmail.com writes:
?par
Look for arguments
mfrow and mfcol
Original Post
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of R Granell,
Medicine
Is there a way of obtaining more than one histogram in the graph-window so
you can edit all the plots
Dear R-users,
I'm struggling in R in order to squeeze a matrix without using a
for-loop.
Although my case is a bit more complex, the following example should
help you to understand what I would like to do, but without the slow
for-loop.
Thanks in advance,
Carlo Giovanni Camarda
A - matrix(1:54,
On 30 Jan 2006, [EMAIL PROTECTED] wrote:
Current behaviour is consistent in so far that identical(all(x),
!any(!x)) is TRUE and definition of any() is obvious.
That helps, thanks. I'm not sure I've had enough coffee to continue,
but, for the set analogy I think we are saying:
logical(0) is
On Monday 30 January 2006 14:40, Philippe Grosjean wrote:
Hello,
Not exactly the same. By the way, why do you use do.call()? Couldn't you
do simply:
expand.grid(split(t(replicate(3, c(0, 1, NA))), 1:3))
Best,
Philippe Grosjean
Jacques VESLOT wrote:
this looks similar:
Seth Falcon wrote:
On 30 Jan 2006, [EMAIL PROTECTED] wrote:
Current behaviour is consistent in so far that identical(all(x),
!any(!x)) is TRUE and definition of any() is obvious.
That helps, thanks. I'm not sure I've had enough coffee to continue,
but, for the set analogy I think we are
Hello,
I am a new user of R. I am trying to use the packages fBasics and fExtremes
when i am running the examples I get few error. Could someone tell me what is
happenig? Thank you beforehand.
from Fbasics packages:
xmpfBasics()
Error in file(file, r) : unable to open connection
In
The result is linear in A so its a matter of finding the matrix to multiply it
by:
matrix(c(rep(1,3), rep(0,7)), 3, 9, byrow = TRUE) %*% A
On 1/30/06, Camarda, Carlo Giovanni [EMAIL PROTECTED] wrote:
Dear R-users,
I'm struggling in R in order to squeeze a matrix without using a
for-loop.
Seth Falcon [EMAIL PROTECTED] writes:
On 30 Jan 2006, [EMAIL PROTECTED] wrote:
Current behaviour is consistent in so far that identical(all(x),
!any(!x)) is TRUE and definition of any() is obvious.
That helps, thanks. I'm not sure I've had enough coffee to continue,
but, for the set
I am creating habitat selection models for caribou and other species with
data collected from GPS collars. In my current situation the radio-collars
recorded the locations of 30 caribou every 6 hours. I am then comparing
resources used at caribou locations to random locations using logistic
use 'filter':
x - matrix(1:100,10)
x
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]1 11 21 31 41 51 61 71 8191
[2,]2 12 22 32 42 52 62 72 8292
[3,]3 13 23 33 43 53 63 73 8393
[4,]4 14 24 34 44
Hi,
This is not an R question, but can anyone please point me to C/Fortran (C
preferred) code which calculates the non-central t-density or the cdf?
Many thanks and best wishes!
GT
__
R-help@stat.math.ethz.ch mailing list
I am a statistician and I come up to an interesting problem in
cryptography. I would like to use R since there are some statistical
procedures that I need to use.
However, I run into a problem when using the modulus operator %%.
I am using R 2.2.1 and when I calculate modulus for large numbers
R-2.2.1 is still not available for Redhat Linux as an RPM on CRAN. It
is available as an SRPM. Can someone fill me in on why it takes so long
to make RPMs available? I would be happy to help make the RPMs for el4
and el3 if such help is needed.
Regards,
Scott Waichler
Pacific Northwest
hadley wickham wrote:
I read this to mean that setting a value in list will be O(n) (where n
is the length of the new list) - If you blindly expect a list to act
like a hash table you will be badly surprised. If you are copying an
algorithm from another language, you will probably need to
Hello
I am sorry fuch such a stupid question. Suppose I have a table of data having a
lot of NAs and I want to replace those NAs by the mean of the column before NA
replacement. How is it possible to do that efficiently ?
Thanks in advance,
Julie
--
Julie Bernauer
Yeast Structural Genomics
I would think that when translating from another language,
it is best to write it in R in the simplest way, which probably
means using a list. Then if it turns out to be too slow, try doing
something fancy. I suspect that speed improvements are
seldom necessary -- I can't believe how fast
Lots of other folks will give you the simple answer (hint: ?'[' ?is.na)
Yours is one of those iceberg questions -- 2/3 hidden underwater.
Two points:
Point 1: Generally you **don't have to do such replacement** as most of R's
functions have a na.rm or na.action argument (unfortunately, for
Don't know about efficiency but here is one way:
# test data
A - matrix(1:54, ncol=6)
A[3,3] - A[6,6] - A[5,6] - NA
f - function(x) ifelse(is.na(x), mean(x, na.rm = TRUE), x)
apply(A, 2, f)
On 1/30/06, Julie Bernauer [EMAIL PROTECTED] wrote:
Hello
I am sorry fuch such a stupid question.
On Mon, 2006-01-30 at 08:38 -0800, Waichler, Scott R wrote:
R-2.2.1 is still not available for Redhat Linux as an RPM on CRAN. It
is available as an SRPM. Can someone fill me in on why it takes so long
to make RPMs available? I would be happy to help make the RPMs for el4
and el3 if such
Hello, good morning or evening!...
After studying some of the examples at S-poetry Document, I tried to
implement some of the concepts in my R script, that intensively uses
looping constructs. However I did not manage any improvement.
My main problem is that I have a list of a lot of data e.g.:
Gavin Simpson [EMAIL PROTECTED] writes:
On Mon, 2006-01-30 at 08:38 -0800, Waichler, Scott R wrote:
R-2.2.1 is still not available for Redhat Linux as an RPM on CRAN. It
is available as an SRPM. Can someone fill me in on why it takes so long
to make RPMs available? I would be happy to
You have reached the maximum value that can be stored accurately in a
floating point number. That is what the error message is telling you. I
get 21 warnings and this says that at 8^20 I am now truncating digits in the
variable. You only have about 54 bits in the floating point number and you
You might also want to look at the impute package on CRAN.
Sean
On 1/30/06 11:50 AM, Julie Bernauer [EMAIL PROTECTED]
wrote:
Hello
I am sorry fuch such a stupid question. Suppose I have a table of data having
a
lot of NAs and I want to replace those NAs by the mean of the column before
On Mon, 2006-01-30 at 18:53 +0100, Peter Dalgaard wrote:
Gavin Simpson [EMAIL PROTECTED] writes:
snip
...Mores the point, though, which CRAN mirror were you looking at? R
2.2.1 was in all the EL3/4 and FC3/4 i386 and x86_64 directories I could
be bothered to look at on the UK Bristol mirror
On Monday 30 January 2006 14:40, Philippe Grosjean wrote:
Hello,
Not exactly the same. By the way, why do you use do.call()? Couldn't you
do simply:
expand.grid(split(t(replicate(3, c(0, 1, NA))), 1:3))
Just for the sake of it, the above can be even more simple with:
expand.grid(lapply(1:3,
...More the point, though, which CRAN mirror were you looking at? R
2.2.1 was in all the EL3/4 and FC3/4 i386 and x86_64 directories I
could be
bothered to look at on the UK Bristol mirror for example.
I use this mirror:
http://cran.fhcrc.org/ Fred Hutchinson Cancer Research Center, Seattle,
On 1/30/2006 11:32 AM, Ionut Florescu wrote:
I am a statistician and I come up to an interesting problem in
cryptography. I would like to use R since there are some statistical
procedures that I need to use.
However, I run into a problem when using the modulus operator %%.
I am using R
In my function I am trying to return multiple computed items (separated by
commas). The function does what I need, but I get a warning message that
multi-argument returns are deprecated. Is this a warning I should heed, or is
there a more elegant and warning free way of achieving the same
R is probably not the best tool for handling large integers...
AFAIK Python has the interesting feature of not only having a `long' integer
type (that can store arbitrarily large integers), but can convert a regular
4-byte int to the `long' type when necessary. Perhaps that would be a
better
On Mon, 2006-01-30 at 10:18 -0800, Waichler, Scott R wrote:
...More the point, though, which CRAN mirror were you looking at? R
2.2.1 was in all the EL3/4 and FC3/4 i386 and x86_64 directories I
could be
bothered to look at on the UK Bristol mirror for example.
I use this mirror:
Thank you for the quick reply, I will look into the R packages.
For crashing R try this:
generator.zp=function(x,p)
{a=1:(p-1); b=x^a%%p;
if(all(b[1:(p-2)]!=1)(b[p-1]==1)){return(x, Good )}
else{return(x, No Good, try another integer )}
}
This checks if element x is a generator of the group
See:
http://www.biostat.wustl.edu/archives/html/s-news/2002-11/msg00079.html
The original source is from the Applied Statistics section on the StatLib.
Andy
From: Globe Trotter
Hi,
This is not an R question, but can anyone please point me to
C/Fortran (C
preferred) code which
Return a list:
f - function(x) list(x = x, x.squared = x*x)
On 1/30/06, Krish Krishnan [EMAIL PROTECTED] wrote:
In my function I am trying to return multiple computed items (separated by
commas). The function does what I need, but I get a warning message that
multi-argument returns
On 1/30/2006 1:39 PM, Ionut Florescu wrote:
Thank you for the quick reply, I will look into the R packages.
For crashing R try this:
generator.zp=function(x,p)
{a=1:(p-1); b=x^a%%p;
if(all(b[1:(p-2)]!=1)(b[p-1]==1)){return(x, Good )}
else{return(x, No Good, try another integer )}
}
On Mon, 2006-01-30 at 10:35 -0800, Krish Krishnan wrote:
In my function I am trying to return multiple computed items
(separated by commas). The function does what I need, but I get a
warning message that multi-argument returns are deprecated. Is this a
warning I should heed, or is there a
The other thing that you have to be aware of is that 8^n is not 8 multiplied
by itself n times. You are probably using logs to compute this. Here is a
sample of 8^(1:20). The value of 8^2 is 64.004 (not exactly an
integer); roundoff errors are apparent in the other values.
8^(1:20)
For the last few versions of R (don't remember when the change happened
now), you need to explicitly wrap the objects in a list, instead of simply
having them in return(). I.e., instead of return(a=thing1, b=thing2), you
simply use list(a=thing1, b=thing2) as the last line of the function.
Andy
Dear Dr. Bates,
Thank you very much for your response. I had consulted
the algorithm described in Pinheiro and Bates.
However, what I don't understand (among other things)
is why my two parameters appear to be estimated at
different grouping levels (based on the DF values).
Affect this different
I think this does what your loop is doing. Take about 0.5 seconds.
system.time(
+ result - lapply(xs, function(.val){
+ .sums - filter(.val, rep(1,5)) # add 5 connected values together
+ .sums[-c(1,2,length(.sums)-1, length(.sums))]
+ })
+ )
[1] 0.50 0.00 0.54 NA NA
On 1/30/06,
Thanks everyone. Returning the items in a list worked like a charm.
-
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
fingers were too fast. Left off the creation of the two lists (total
sums) that you wanted.
system.time(
result - lapply(xs, function(.val){
.total - sum(.val) # total sum
.sums - filter(.val, rep(1,5)) # sum 5 consective values
list(total=.total, sum=.sums[-c(1,2,length(.sums)-1,
This is a double protection error in real_binary. See the R-devel list
for the details. Now fixed.
On Mon, 30 Jan 2006, Ionut Florescu wrote:
Thank you for the quick reply, I will look into the R packages.
For crashing R try this:
generator.zp=function(x,p)
{a=1:(p-1); b=x^a%%p;
Hello all,
I am trying to perform ANOVA on my sample data given below to see if any
gene(column 1 stands for gene names) is differentially expressed after
subjecting it to the 6 different experiments(columns 2 to 7 are
experiments).
Gene
14A_U133A_Detection
14B_U133A_Signal
From: Constantine Tsardounis
Hello, good morning or evening!...
After studying some of the examples at S-poetry Document, I tried to
implement some of the concepts in my R script, that intensively uses
looping constructs. However I did not manage any improvement.
My main problem is that I
I tried to let this pass, but failed:
lapply(1:3, function(x) c(0, 1, NA))
might more clearly be written as
rep(list(c(0, 1, NA)), 3)
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and A Guide for the Unwilling S User)
Adrian Dusa wrote:
On
On Monday 30 January 2006 21:44, Patrick Burns wrote:
I tried to let this pass, but failed:
lapply(1:3, function(x) c(0, 1, NA))
might more clearly be written as
rep(list(c(0, 1, NA)), 3)
Indeed! Excellent, thanks :)
Hmm, I was just thinking perhaps my first example was too cluttered to
Thanks a lot for the explanation and the advice! It looks like I
should find something else to do with the data. I'm afraid that my
knowledge of numerical analysis is very limited, and I haven't read
Wilkinson's book.
Best Regards,
Ole Edsberg
__
Hi R-listers,
I have a simple question about a data frame.
I sorted a data set by one of the variable in some condition (eg. X=0), the
followed is part of the achieved. I was wondering how can I get the row name,
i. e. (1202, 2077 , 2328, 3341,... ) and save them as a vector.
rownames(subset(mydata, X =0))
?rownames
Leaf Sun wrote:
Hi R-listers,
I have a simple question about a data frame.
I sorted a data set by one of the variable in some condition (eg. X=0), the
followed is part of the achieved. I was wondering how can I get the row name,
i. e.
I suspect the weights argument is not having any effect.
Package: Matrix
Version: 0.995-2
Date: 2006-01-19
Beginning with this:
Browse[1] resp.lmer - lmer(SensSSC ~ Block + Season + (1 | Plot) + (1 | Ma)
+ (1 | Pa) +
+ (1 | MaPa), weights =
I have a column in a data frame that has a class of Date and a mode of
numeric. When I:
max(df$Date)
My output stays in Date format, i.e. 2006-01-03.
However, when I run the following statment:
tapply(df$Date, df$SomeFactor, max)
my output looks like this: 9129 9493 9861 10226 10591
Thank you, I didn't notice that. I may have to come up with my own power
function as well, slower but precise.
jim holtman wrote:
The other thing that you have to be aware of is that 8^n is not 8
multiplied by itself n times. You are probably using logs to compute
this. Here is a sample
Em Seg 30 Jan 2006 18:36, Chuck Cleland escreveu:
rownames(subset(mydata, X =0))
Hi,
I am new to R and read this list to learn. It is amazing how frequently new
functions pop in messages. Useful and timesaving functions like subset
(above) must be documented somewhere.
Is there a glossary
jim holtman [EMAIL PROTECTED] writes:
The other thing that you have to be aware of is that 8^n is not 8 multiplied
by itself n times. You are probably using logs to compute this. Here is a
sample of 8^(1:20). The value of 8^2 is 64.004 (not exactly an
integer); roundoff errors
I don't know about rownames but
x = 0 gives you a vector of logical values True and false.
If then you do
c(1:length(x)) [x=0]
this gives the positions where the true happened, meaning your vector of
values.
Chuck Cleland wrote:
rownames(subset(mydata, X =0))
?rownames
Leaf Sun wrote:
Actually it does that in my 2.2.1 version as well:
options(digits=20)
8^(1:20)
[1] 8.e+00 6.4004e+01 5.1201e+02
[4] 4.0961e+03 3.27680002e+04 2.62144002e+05
[7] 2.09715199e+06 1.67772159e+07
Dumb newbie question: I've searched the manual, R help and the mailing list
archives, but can't seem to find the answer to this simple problem that I
have. If I have a series of columns in a dataframe: (A, B, C ...) and I want
to merge them with another series of columns (Z,Y,X ...) such that the
I am not sure what you mean by a glossary, but subset and rownames are
both in the R Reference Index:
http://cran.r-project.org/doc/manuals/fullrefman.pdf
If you suspect there might be an R function for something but don't know
what it is, help.search() can be useful. For example:
Hi
In mixed-model with lme()
How can I obtain Type II SS or Type III SS for fixed effect?
Thanks
Julien
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
I am having trouble installing RMySQL on a clean install of Fedora Core 4 64
bit on a dual dual core machine (that is, two dual core processors). Seems
like the LD_LIBRARY_PATH is incorrect, but I don't seem to have it quite
right yet.
There are a few mentions of this problem in google, but
Here's one possible way (assuming the two data frames have the same number
of columns):
d1 - data.frame(A=1, B=2, C=3)
d2 - data.frame(X=1, Y=2, Z=3)
res - c(d1, d2) # This cbind them and turn into a list.
idx - as.vector(matrix(1:(2 * ncol(d1)), 2, byrow=TRUE))
idx
[1] 1 4 2 5 3 6
Ionut Florescu [EMAIL PROTECTED] writes:
Actually it does that in my 2.2.1 version as well:
options(digits=20)
8^(1:20)
[1] 8.e+00 6.4004e+01 5.1201e+02
[4] 4.0961e+03 3.27680002e+04 2.62144002e+05
[7]
1 - 100 of 135 matches
Mail list logo