On Sun, Nov 23, 2008 at 8:06 PM, Ben Bolker [EMAIL PROTECTED] wrote:
In that case won't
x2 - (x-min(x))/(max(x)-min(x)) ## establishes criterion 1
That one is not needed, as the range is automatically between 0 and 1:
min(ws)
[1] 6.925322e-05
max(ws)
[1] 0.284
so that is fine.
but when I
Hello,
This is my first time posting to the R-help list and I apologize for
the apparent triviality of my query.
I am creating an R script to create Univariate Exploratory Analysis of
a input dataset (No meta-data to provide extra information about each
column)
.
Providing summary statistics is
How about:
tapply(dat$x1,dat$subject,function(x) cumsum(x))
which gives you a list for each subject.
this can be converted to a vector:
do.call(c,tapply(dat$x1,dat$subject,function(x) cumsum(x)))
So if your data frame is ordered for your subjects:
I have the complete data like
id time censor
1 10 0
1 20 0
1 30 0
2 10 0
2 20 1
2 30 0
2 40 0
3 10 0
3 20 0
3 30 1
for id 1, i want to select the last row since all censor indicator is 0; for
id 2, i want to select the row where censor ==1; for id 3, i also want to
select the row where
Hi, is there any function or package for timer?
What I inted to do is to run procedure(/or function) every x seconds. (x
10 seconds)
for instance, visual basic provides : application.onTime method.
Rather than utilizing loop, I want to know whether R provides superior
solution with time
Hi,
to my knowledge there is none, but some time ago I wrote some code
that prepares the input files for GeoDis and reads the output. Doing
a NCA was a matter of seconds! I did not go on developing it, though,
because I do not use NCA any more and the current code is very poorly
have a look at ?txtProgressBar.
cheers,
Gerhard Schön
Hi, is there any function or package for timer?
What I inted to do is to run procedure(/or function) every x seconds. (x
10 seconds)
for instance, visual basic provides : application.onTime method.
Rather than utilizing loop, I want to
Sorry, I had no seen your previous e-mail. Just another question. Is
there any way to obtain an R2 to have a numeric idea of how good is the
fitting?
Daniel Valverde Saubí
Grup de Biologia Molecular de Llevats
Facultat de Veterinària de la Universitat Autònoma de Barcelona
Edifici V, Campus
Dear R experts and statisticians,
I have some time series datasets, they are several years vegetation indices
(about 50 data points per year) sampled from different station. These indices
have similar dynamics with seasonal change.
My questions are,
1) How can I compare the difference
Dear Ian,
thanks a lot for your clarifications.
AIM == A I McLeod [EMAIL PROTECTED]
on Sat, 22 Nov 2008 22:24:11 -0500 (EST) writes:
AIM The package Kendall computes the p-value when there are
AIM ties in one ranking. This often happens with trend
AIM testing with
Dear list,
hi !
I am a R beginner and I have a function to optimize .
alpha = argmin{ f(x,alpha) }
I want alpha to be in [0,1]. Is there any function that can work?
I use nlm() but i can't fix the domain of alpha.
thanks in advance
___
Jiang Peng, Ph.D.
Thank you Hadley.
I've just discovered an another bug (perhaps ?) :
qplot(mpg, wt, data=mtcars)# works
qplot(mpg, wt, data=mtcars, geom = line) # works
qplot(mpg, wt, data=mtcars) + facet_grid(cyl ~ vs) # works
qplot(mpg, wt, data=mtcars, geom = line) + facet_grid(cyl ~ vs)
Erreur dans
Dear List:
I just successfully installed R 2.8.0 (under Windows XP SP2, 1GB RAM) and
wanted to run update.packages.
When I first called chooseCRANmirror I obtained the following error message:
chooseCRANmirror()
Warning message:
In open.connection(con, r) :
kann nicht mit
gallon li schrieb:
for id 1, i want to select the last row since all censor indicator is 0; for
id 2, i want to select the row where censor ==1; for id 3, i also want to
select the row where censor==1. So if there is a 1 for censor, then I want
to select such a row, otherwise I want to select
The classes of the columns are:
sapply(DF, class)
On Mon, Nov 24, 2008 at 3:39 AM, Harsh [EMAIL PROTECTED] wrote:
Hello,
This is my first time posting to the R-help list and I apologize for
the apparent triviality of my query.
I am creating an R script to create Univariate Exploratory
The data set in R is wrong. I've found mistakes on 2 lines in a quick look.
I don't know if the data is incorrect in the Appendix of Fleming and
Harrington as well (someone seems to have borrowed my copy), which is where the
data set appears to have been taken from, given all the -9
Thanks - I'll add it to my to do list.
Hadley
On Mon, Nov 24, 2008 at 5:43 AM, David Hajage [EMAIL PROTECTED] wrote:
Thank you Hadley.
I've just discovered an another bug (perhaps ?) :
qplot(mpg, wt, data=mtcars)# works
qplot(mpg, wt, data=mtcars, geom = line) # works
qplot(mpg, wt,
Hesen Peng wrote:
My Dear R buddies,
I'm feeling ashamed that I've been running my R program on some
servers for a while but do not know exactly how R is working. The
servers are chained together using Sun Grid Engine. Each node has 8
quad-core CPUs. I wonder how many cores and CPUs are used
On the help page for nlm (type ?nlm) check out the 'See Also' section.
It mentions other functions such as 'optim' and 'nlminb' which can do
constrained optimizations.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Jiang Peng
Sent: Monday, November 24,
Is this the actual problem that you are trying to optimize, i.e. optimize a
function with respect to a scalar unknown parameter?
If so, just use optimize and specify the search interval for the algorithm
as [0,1].
Ravi.
Dear Terry,
Thank you very much for taking your time to address this problem!
I did check the data in FH. I couldn't detect any differences between the
R data set and the one in the Appendix. The preface in FH acknowledges
that the data set was obtained from Roland Dickinson. Is the data
Dear R gurus,
On the CRAN website, it says that a 64bit version for Mac OS Tiger would be
release shortly. Do we know what are the expected dates? Will the packages be
also compiled for 64bit?
We are running large microarray analysis and we keep hitting the 3Gb memory
limit.
I saw that there
bartjoosen wrote:
How about:
tapply(dat$x1,dat$subject,function(x) cumsum(x))
which gives you a list for each subject.
this can be converted to a vector:
do.call(c,tapply(dat$x1,dat$subject,function(x) cumsum(x)))
So if your data frame is ordered for your subjects:
Hi
I managed tio install Rmpi and to load it, but I get the following
errormessage when I try to create an MPI cluster and R hangs (no
response):
library(Rmpi)
[head001:15781] mca: base: component_find: unable to open osc pt2pt:
file not found (ignored)
library(snow)
cl - makeCluster(2, type =
Sorry - posting reposted at R-sig-hpc
Rainer
On Mon, Nov 24, 2008 at 4:45 PM, Rainer M Krug [EMAIL PROTECTED] wrote:
Hi
I managed tio install Rmpi and to load it, but I get the following
errormessage when I try to create an MPI cluster and R hangs (no
response):
library(Rmpi)
You need to do the homework yourself. What is correct depends on what the data
says,(and what exactly the prof wants). :) The best idea probably is to decide
yourself on what you want to present and write a rationale as to why you chose
this analysis.
More generally there is a lot of good
-- Forwarded message --
From: Hesen Peng [EMAIL PROTECTED]
Date: Mon, Nov 24, 2008 at 9:28 AM
Subject: Re: [R] More than doubling performance with snow
To: Prof Brian Ripley [EMAIL PROTECTED]
I'm sorry but I don't quite understand what not running solve() in
this process means. I
Hi all
If I have a string, say ABCDA, and I want to convert this to the sum of the
letter values, e.g.
A - 1
B - 2
etc, so ABCDA = 1+2+3+4+1 = 11
Is there an elegant way to do this? Trying something like
which(LETTERS %in% unlist(strsplit(ABCDA, )))
is not quite correct, as it does not
on 11/24/2008 08:57 AM [EMAIL PROTECTED] wrote:
Hi all
If I have a string, say ABCDA, and I want to convert this to the sum of the
letter values, e.g.
A - 1
B - 2
etc, so ABCDA = 1+2+3+4+1 = 11
Is there an elegant way to do this? Trying something like
which(LETTERS %in%
I'm sorry but I don't quite understand what not running solve() in
this process means. I updated the code and it do show that the result
from clusterApply() are identical with the result from lapply(). Could
you please explain more about this?
The point is that a parallel processing framework
Hi Mark
Thanks, that's almost exactly what I need...theres just a slight difference
with my requirement, in that I am looking for the actual index value in the
alphabetical sequence, so that instead of:
as.numeric(factor(unlist(strsplit(XYZ,
[1] 1 2 3
I would expect to see
[1] 24 25 26
Here are a couple of solutions.
The first matches each
character against LETTERS returning the position number
in LETTERS of the match. strsplit returns a list of which
we want the first element and then we sum that.
The second applies function(x) match(x, LETTERS),
which is specified in
You can use Mark's code by giving levels to the factor, e.g.
as.numeric(factor(unlist(strsplit(ABCDAXYZ, )), levels=LETTERS))
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of [EMAIL PROTECTED]
Sent: Monday, November 24, 2008 9:15 AM
To: [EMAIL
Thanks, that's almost exactly what I need...theres just a slight
difference with my requirement, in that I am looking for the actual
index value in the alphabetical sequence, so that instead of:
as.numeric(factor(unlist(strsplit(XYZ,
[1] 1 2 3
I would expect to see
[1] 24 25 26
Yep, my error...it should be:
as.numeric(factor(unlist(strsplit(ABCDA, )), levels = LETTERS))
[1] 1 2 3 4 1
as.numeric(factor(unlist(strsplit(XYZ, )), levels = LETTERS))
[1] 24 25 26
The step that I missed was setting the factor levels to the full set of
LETTERS.
HTH,
Marc
on 11/24/2008
Thanks, that's almost exactly what I need...theres just a slight
difference with my requirement, in that I am looking for the actual
index value in the alphabetical sequence, so that instead of:
as.numeric(factor(unlist(strsplit(XYZ,
[1] 1 2 3
I would expect to see
[1] 24 25 26
Thanks a lot for the solutions everyone...really appreciated.
Cheers
Rory
Rory Winston
RBS Global Banking Markets
Office: +44 20 7085 4476
-Original Message-
From: Marc Schwartz [mailto:[EMAIL PROTECTED]
Sent: 24 November 2008 15:24
To: WINSTON, Rory, GBM
Cc: r-help@r-project.org
G'day Rory,
On Mon, 24 Nov 2008 14:57:57 +
[EMAIL PROTECTED] wrote:
If I have a string, say ABCDA, and I want to convert this to the
sum of the letter values, e.g.
A - 1
B - 2
etc, so ABCDA = 1+2+3+4+1 = 11
Is there an elegant way to do this? [...]
R
Hi Jaey,
I asked a similar type of question last month, maybe it might be
helpful to you: https://stat.ethz.ch/pipermail/r-help/2008-October/176645.html
Warm Regards,
Tony Breyal
On 24 Nov, 08:21, jaey.ahn [EMAIL PROTECTED] wrote:
Hi, is there any function or package for timer?
What I inted
Hi!
I want to create manhattan plots for genome-wide association studies
(-log(p) ~ SNPs). I wonder whether there is a recommended approach
avoiding the problems I have with the functions named below
Im my data I have only significant SNPs for dozens of similar phenotypes
using different
dear
I was lokking for a solution or an example on the internet for quite a time
but since haven´t found an answer yet, I'd like to ask a maybe to simple
question:
I have a large ncdf-file with five dimension.
temperature (t2m), the variable against, lat, lon and time. (height is
included as
Dear List:
I just successfully installed R 2.8.0 (under Windows XP SP2, 1GB RAM) and
wanted to run update.packages.
When I first called chooseCRANmirror I obtained the following error message:
chooseCRANmirror()
Warning message:
In open.connection(con, r) :
kann nicht mit
I have a problem with permutations functions in R
I just started using R so maybe it is an easy question
I need to obtain all the 9.somthingExp 157 permutations that can be
given from the number from 1 to 100
I wrote the following commands:
library(gregmisc)
options(expressions=1e5)
I have Q3 sales for consecutive years 2002-2007 that I'm using to
predict buying (yes/no) in Q3 in 2008. My data are arranged in counting
process format where each customer has 6 rows of data, one for each
year. However, there is no variability within the strata at the
customer level: if someone
Hi,
I found the solution to the issue of saving plots from color2D.matplot
to a file by using savePlot (to save to jpeg or png).
Furthermore my previous post was incomplete: the system used is MS Win
XP, R v2.8.0.
Thanks,
Bernardo Garcia Carreras
__
I need help with (hopefully) just one more thing. I have been fussing with
this for quite some time and have decided just to give up and ask! I want to
match a column in a matrix to a vector. I found a which command that I
thought would be helpful as it does the following:
g=c(1,5,3,2,7)
R-users--
I am wondering if the cumulative hazard is being correctly computed when
evaluated using centered=FALSE. In the bazehaz code (from the survival package)
(below), I think
H - H * exp(-bz0) should be
H - H * exp(bz0)
function (fit, centered = TRUE)
{
if (!inherits(fit,
I wish to have inward-pointing ticks on my contourplot graph, but the
colored background produced by the region=TRUE statement covers the
ticks up, is there any way around this? Sample code below. --Seth
library(lattice)
model - function(a,b,c,d,e, f, X1,X2) # provide model function
Thanks Doug,
I appreciate your response. I'm not a statistician and didn't realize this
limitation of the distribution and model I chose. This may be getting beyond
the scope of this help list, but I'll try anyway:
If the variance of the response variable (survival) is, in fact, a function
of a
On 24-Nov-08 13:36:31, Mulazzani Fabio (Student Com06) wrote:
I have a problem with permutations functions in R
I just started using R so maybe it is an easy question
I need to obtain all the 9.somthingExp 157 permutations that can be
given from the number from 1 to 100
I wrote the
To an adequate approximation there are 10^158 of them.
Simply to obtain them all (at a rate of 10^10 per second, which is
faster than the CPU frequency of most desktop computers) would take
10^148 seconds, or slightly longer than 3*(10^140) years.
Current estimates of the age of the
How about which(colSums(t-v) == 0) ?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Salas, Andria Kay
Sent: Monday, November 24, 2008 10:04 AM
To: r-help@r-project.org
Subject: [R] matching matrix columns to a vector
I need help with (hopefully) just
Dear R-users,
I am using the most updated package of lme4 (lme4_0.999375-2). I have a
data set consisting of ~900 observations at ~440 independent survey
sites. There are an unbalanced number of surveys at each site. I am
attempting to develop several models evaluating the presence/absence
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the documentation seems to make clear that there _many_ empty
sets depending on the vector's mode, namely, numeric(0), character(0),
logical(0), etc. This is borne out by
y - letters[1:3]
z -
Hi,
there is a new mailing list for R and HPC: [EMAIL PROTECTED]
This is probably a better list for this question. Do not forget, first
of all you have to register: https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
In this case the communication overhead is the problem. The data /
matrix is to
Hi,
Does anyone know how to print help files from R's prompt?
One can read the help text for read.table by doing
?read.table
on the R prompt. In a similar fashion, can I print the help read.table
without having to resort to a web browser?
Please CC me on any reply.
Hello.
After run, installed.packages() the following error arose:
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning message:
In gzfile(file, mode) :
cannot open compressed file
Just a guess but try right clicking the R icon on your desktop, choose
Run As Administrator
and then in that session issue your install.packages commands.
On Mon, Nov 24, 2008 at 12:30 PM, Manuel
[EMAIL PROTECTED] wrote:
Hello.
After run, installed.packages() the following error arose:
Hi,
With ggplot2 v0.8, how do I position a legend on top of the plot. Things
like
p + opts(legend.position=top)
work ok. But
p + opts(legend.position=c(0.5,0.5))
gives
Error in as.character(x) :
cannot coerce type 'closure' to vector of type 'character'
so obviously I should be giving
Dear Steven,
length(x)
Does this cover all your use
cases?
Yes, and thanks again to everybody else who later replied. I had
falsely imagined something so much more complicated...!? Next time,
I will wait 8*runif(1) before posting. :-)
Best,
Jay
HTH
Steven McKinney
Statistician
(Apologies if this repost is a duplicate,
my first submission did not appear to
make it through.)
-Original Message-
From: Steven McKinney
Sent: Mon 11/24/2008 4:28 PM
To: 'Blanchette, Marco'; R-help
Subject: RE: [R] 64bit R for Mac
Dear Marco
Check out
http://r.research.att.com/
and
Dear Jay,
length(x) will return zero
for all these (vector) examples,
and is quite readable in code.
(You might have seen code such as
if(length(x)) { blah }
which uses this idea.)
Does this cover all your use
cases?
x - c()
class(x)
[1] NULL
length(x)
[1] 0
y - letters[1:3]
z -
Dear all,
I'm looking for an unsupervised dimensionality reduction method for large-scale
data sets ( 40.000 attributes) which retains the original attribute vectors
(i.e. unsupervised feature selection). Until now I have only found several
unsupervised dimensionality reduction methods which
?length
Chuck
On Mon, 24 Nov 2008, G. Jay Kerns wrote:
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the documentation seems to make clear that there _many_ empty
sets depending on the vector's mode, namely, numeric(0),
Dear Marco
Check out
http://r.research.att.com/
and see if the
R 2.8.0 Patched (2008-11-21)tiger
R-2.8-branch-n.dmg
works for you (n = 47002 at
this writing - changes every now and then).
I'm no longer running Tiger so haven't
tried this directly, but the Leopard
version is
length()
/Henrik
On Mon, Nov 24, 2008 at 9:41 AM, G. Jay Kerns [EMAIL PROTECTED] wrote:
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the documentation seems to make clear that there _many_ empty
sets depending on the vector's mode,
Peter,
After I made a small modification it worked:
with(dat, ave(x1, subject, FUN=cumsum))
But what's the use of with?
If I use ave(x1, subject, FUN=cumsum), I get the same result?
Bart
- Original Message -
From: Bart Joosen [EMAIL PROTECTED]
To: Peter Dalgaard [EMAIL PROTECTED]
hi there
I have a dataframe
abc 123 345
abc 345 456
lmn 567 345
hkl 568 535
lmn 096 456
lmn 768 094
i want the uniques of column 1 and there corresponsing column 2 and 3
output
abc 123 345
lmn 567 345
hkl 568 535
cbind(DF1[,1],DF1[which(unique(DF1[,1]),c(2,3)])
but didnt work
kindly let
This is safest if the below code is wrapped in another function.
At the top level function (or whatever level you will be using your choice
information at) first create the variable named choice with a default value
(choice - ).
In your OnOk function, change choice- to choice-, this will make
Dear Everybody,
Thanks, length() is the answer.
Best,
Jay
On Mon, Nov 24, 2008 at 1:15 PM, Ted Harding
[EMAIL PROTECTED] wrote:
On 24-Nov-08 17:41:25, G. Jay Kerns wrote:
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the documentation
Hi,
i'm trying to install the packages rgdal and spgrass6 by install.packages
but i receive always this message:
ERROR: configuration failed for package 'rgdal'
** Removing '/home/thyberio/R/i486-pc-linux-gnu-library/2.7/rgdal'
** Restoring previous
Hi Paul,
That's a bug - I'll look into it.
Regards,
Hadley
On Mon, Nov 24, 2008 at 10:46 AM, Paul Emberson [EMAIL PROTECTED] wrote:
Hi,
With ggplot2 v0.8, how do I position a legend on top of the plot. Things
like
p + opts(legend.position=top)
work ok. But
p +
all.equal(x, character(0)) # TRUE
This would seem to be the solution, but am I missing something? and in
particular, is there an elegant way to check in the case that the mode
of the vector is not already known?
If you do not care about the mode of the vector, wouldn't simply
Rory Winston wrote:
I have got it to work in a fairly non-elegant manner, using the
following code:
sum ( unlist(lapply(strsplit(TESTING,), function(x)
match(x,LETTERS) )) )
And over a list of names, this becomes:
lapply(namelist, function(Z) { sum ( unlist(lapply(strsplit(Z,),
Peter,
I actually took a look at the ave function, but couldn't manage to get it
right.
But when I try your code, I get Error in as.vector(x, mode) : invalid
argument 'mode'.
Any ideas?
Bart
- Original Message -
From: Peter Dalgaard [EMAIL PROTECTED]
To: bartjoosen [EMAIL
Consider:
apply(t,2,function(x)identical(x,v))
[1] TRUE FALSE FALSE FALSE
apply(t,2,function(x)identical(x,v))+0
[1] 1 0 0 0
and if you wanted to get the position you could use which:
which(apply(t,2,function(x)identical(x,v)))
[1] 1
t[,4] - v
which(apply(t,2,function(x)identical(x,v)))
on 11/24/2008 10:03 AM Salas, Andria Kay wrote:
I need help with (hopefully) just one more thing. I have been
fussing with this for quite some time and have decided just to give
up and ask! I want to match a column in a matrix to a vector. I
found a which command that I thought would be
You can also add to the fortune is that there are approximately
10^24 grains of sands on the earth. If every one could store a
permutation, you are still way short of the storage that you would
need.
On Mon, Nov 24, 2008 at 12:01 PM, Stefan Grosse [EMAIL PROTECTED] wrote:
To an adequate
I believe you can simply modify the panel function to replot the axes
on top with panel.axis(),
library(lattice)
model - function(a,b,c,d,e, f, X1,X2) # provide model function
# for contour plot
{J - a + (b*X1) + (c*X2) + (d*X1*X2) + e*(X1^2) + f*(X2^2)
pp - exp(J)/(1+exp(J))
hi there
I have a dataframe
abc 123 234
abc 234 456
def 567 234
elm 123 456
klm 234 678
klm 465 678
I want the unique of first colum along with the values in colum 2 and 3.I By
default it will select the first element for the unique so my out put should
be
abc 123 234
def 567 234
elm 123 456
hi there
I have a dataframe
abc 123 345
abc 345 456
lmn 567 345
hkl 568 535
lmn 096 456
lmn 768 094
i want the uniques of column 1 and there corresponsing column 2 and 3
output
abc 123 345
lmn 567 345
hkl 568 535
cbind(DF1[,1],DF1[which(unique(DF1[,1]),c(2,3)])
but didnt work
kindly let
Hi,
I'm getting an error from
http://stat.ethz.ch/R-manual/
linked from http://www.r-project.org/
as follows
**
Forbidden
You don't have permission to access /R-manual/ on this server.
Additionally, a 403 Forbidden
On 24-Nov-08 17:41:25, G. Jay Kerns wrote:
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the documentation seems to make clear that there _many_ empty
sets depending on the vector's mode, namely, numeric(0), character(0),
logical(0),
Since negative values could balance positives, you might need to use:
which(colSums(abs(t-v)) == 0)
t=matrix(1:12,3,4)
v=c(1,2,3)
which(colSums(t-v) == 0)
[1] 1
t
[,1] [,2] [,3] [,4]
[1,]147 10
[2,]258 11
[3,]369 12
t[1,2] - -5
You seem to want:
length(x) == 0
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)
G. Jay Kerns wrote:
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the
I need to do some fairly deep tables, and ftable() offers most of what I
need, except for the weighting. With smaller samples, I've just used
replicate to let me have a weighted data set, but with this data set,
I'm afraid replicate is going to make my data set too big for R to
handle comfortably.
Hello
I'm writing an example PCA analysis for some students. I've done PCA on a
2-column matrix to show it at the most simple form (a rotation of two
axes). I can't, however, figure out how to plot the rotated axes as lines
over top of the original data plotted on the x-y. Does anyone know how
Doesn't length(x)=0 do the trick?
In general, the cardinality of a set represented as a vector or list
of elements is length(unique(x)). Unique uses `identical` as its
equivalence relation, so length( unique( list( 1L, 1.0, 1+0i,
as.logical(NA), as.character(NA), as.numeric(NA), NULL,
Hi,
Where can I find information ( freely available on the Internet , and also
books or other sources ) on how having sampling weights changes the
calculation of the standard error (of means and proportions)?
How good is R for this type of procedure? And SAS?
thanks
Robert
Hello,
I'm working with a very large dataset in R on a computer running 64-bit
Windows Server 2008 Standard with 32GB of RAM. According to the R for
Windows FAQ, the maximum value allowed for max-mem-size is 4095MB. Is it
possible to run R with a higher memory limit on this system? I've tried
Bart Joosen wrote:
Peter,
After I made a small modification it worked:
with(dat, ave(x1, subject, FUN=cumsum))
Right. I forgot that it doesn't follow the pattern of tapply.
(If someone could cook up a more evokative name than ave, we could
change this at the same time. grapply() perhaps? or
On 24/11/2008 12:41 PM, G. Jay Kerns wrote:
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the documentation seems to make clear that there _many_ empty
sets depending on the vector's mode, namely, numeric(0), character(0),
logical(0), etc.
You can use the arr.ind option of which:
t=matrix(1:12,3,4)
v=c(1,2,3)
t
[,1] [,2] [,3] [,4]
[1,]147 10
[2,]258 11
[3,]369 12
result - sapply(v, function(x) which(t == x, arr.ind=TRUE))
colnames(result) - v
result
1 2 3 # 'v'
[1,] 1 2
Jagat.K.Sheth wrote:
How about which(colSums(t-v) == 0) ?
But what about v=c(2,1,3)? It needs to be something like
which(colSums((t - v)^2)) == 0
or
which(colSums(abs(t - v))) == 0
Dan
Jagat.K.Sheth wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL
Try length:
x - c()
x
NULL
length(x)
[1] 0
On Mon, Nov 24, 2008 at 12:41 PM, G. Jay Kerns [EMAIL PROTECTED] wrote:
Dear R-help,
I first thought that the empty set (for a vector) would be NULL.
x - c()
x
However, the documentation seems to make clear that there _many_ empty
sets
Hi, any empty set has (or should have) length 0.
y - letters[1:3]
z - letters[4:6]
length(intersect(y,z))
Cheers,
Daniel
-
cuncta stricte discussurus
-
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag
Dan Davison wrote:
Jagat.K.Sheth wrote:
How about which(colSums(t-v) == 0) ?
But what about v=c(2,1,3)? It needs to be something like
which(colSums((t - v)^2)) == 0
or
which(colSums(abs(t - v))) == 0
Sorry, apparently I tried to write a line of R code without using emacs.
Yes! my oversight ... thank you
-Original Message-
From: David Winsemius [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2008 11:48 AM
To: Sheth, Jagat K
Cc: [EMAIL PROTECTED]; r-help@r-project.org
Subject: Re: [R] matching matrix columns to a vector
Since negative values could
Thank you Gabor for your prompt reply.
I had tried checking for class, but it returns three types of my
dataset, which are numeric, integer and character.
The problem with that is, I need to classify some columns as
categorical and in doing so I have a cut off of 100 or less unique
values in the
I did some more research and I think I've answered my own question.
So my next question is, does anyone have any thoughts about how
significant a project it would be to compile R for 64-bit windows
(using, e.g., the Portland Group compiler)?
How much of the code would need to be changed to
1 - 100 of 103 matches
Mail list logo