Hi,
I want to create a new vignette and include it in an already existing
package.
That package has already many vignettes which are related to the chapters
from the book on which the package is built.
It would be a great help if anyone could help to understand how to create
vignette for a statist
I solved this problem by adding "exportselection = 0" to the call to
tklistbox. I.e.
tb1 <- tklistbox(tt, listvariable = tcl1,
exportselection = 0,
selectmode = "multiple")
Thanks,
--sundar
Sundar Dorai-Raj said the following on 10/29/2008 5:56 PM:
Hi,
I'm
2008/10/30 erwann rogard <[EMAIL PROTECTED]>:
> hi,
>
> xyplot(y~x2|x1+which,data=
>>
>> make.groups(dataframe1, dataframe2))
>>
>>
> i'd like to replace the labels for dataframe1 and dataframe2 say with
> c("A","B"). is there a way?
I guess you mean
make.groups(A = dataframe1, B = dataframe2)
see
hi,
xyplot(y~x2|x1+which,data=
>
> make.groups(dataframe1, dataframe2))
>
>
i'd like to replace the labels for dataframe1 and dataframe2 say with
c("A","B"). is there a way?
thanks!
On Mon, Oct 27, 2008 at 2:23 PM, Deepayan Sarkar
<[EMAIL PROTECTED]>wrote:
> On 10/27/08, erwann rogard <[EMAIL P
Each row of my dataframe has these data items:
Stuff1 Stuff2 TripID StopID moreStuff1 moreStuff2 ...
I might have 2 entries for TripID=9011890 and StopID=Reseda, while I
know the "Universe" for that combination was 7. I'd like to set a new
variable (Call it X1) with a value of 3.5 for the two
x <- matrix(rnorm(1:20), 5, 4)
x.qr <- qr(x)
Q <- qr.Q(x.qr)
R <- qr.R(x.qr)
X <- qr.X(x.qr)
Q
R
X
Q %*% R
qr.Q(x.qr, complete=TRUE) ## orthogonal completion
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Erik Iverson wrote:
## BEGIN R CODE
## guarantees there is at least one level with exactly three elements,
## which your problem seems to require
t1 <- data.frame(a = rnorm(10), b = c("D", "D", "D",
sample(LETTERS[1:3], 7, replace = TRUE)))
## find which names have exactly three elements
t2 <-
Hi,
Is it possible to construct a Q from qr() that some of the rows could
be specified (to be fixed values)?
Thanks,
cruz
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-pr
I want to calculate "expansion factors" for elements in my dataframe
based on a 2-d cross classification. Since I'll have "missing values"
(many combinations will have no record) I'll need a second "expansion
factor" for each "row". I've included my "work to date" below, but I'm
not very close t
The two test outcomes will have correlated results, so you will need to look
at either bivariate probit regression or seemingly unrelated regression.
For either of these two methods, you will need to constrain all independent
variable coefficients to be equal, or you will have difficulty making s
Hi,
I'm posting yet another question about tcltk since I'm still struggling
with the package. I'm trying to create a tklistbox and a ttkcombobox on
the same parent and am having a problem. Here's an example:
library(tcltk)
tt <- tktoplevel()
tcl1 <- tclVar()
tcl2 <- tclVar()
tclObj(tcl1) <- l
I have a large matrix which is divided into several pieces, manipulated
individually, and saved into RData in disc. After each pieces are done with
operation, I load them into memory and use rbind to stack them back into
matrix. however, the rbind is only give me the last two pieces. The followi
Using the list function defined here:
http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html
list[m, n] <- as.list(dim(iris))
mylist <- as.list(1:5)
list[Head, Tail] <- list(mylist[[1]], mylist[-1])
On Wed, Oct 29, 2008 at 4:39 PM, Alexy Khrabrov <[EMAIL PROTECTED]> wrote:
> I found there's a v
Assuming that by elements you mean characters ("2E" is the first
element of x but "E" is the last character in x[1]) then this will
create a character matrix of dimensions: length(x) by 2
such that each row corresponds to one component of x
and the second column in that row holds its last character
Just remember that the Linux kernel is also licensed under GPL v2.
I am not sure if you pay for your Linux distribution. But for many gov
sites and for my copy of Linux, they just use Linux as a completely
free product -- in the sense that no money needs to be paid to a
company or anyone. However,
On 30/10/2008, at 11:48 AM, Juliet Hannah wrote:
Here is an example given from
?yags
library(methods)
data(stackloss)
Y1 <- yags(stack.loss~Air.Flow,id=1:21, data=stackloss)
How can I access parts of the output.
I tried:
str(Y1)
Formal class 'yagsResult' [package "yags"] with 25 slots
Hi,
I am dealing with the following problem. There are two biochemical assays,
say A and B, available for analyzing blood samples. Half the samples have
been analyzed with A. Now, for some insurmountable logistic reasons, we
have to use B to analyze the remaining samples. However, we can do a
why not look at the zoo package it can deal with time irregular time
series. I have used it and I have been very happy.
On Wed, Oct 29, 2008 at 5:52 PM, Levy,Ilan [Ontario] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have several time series that I need to plot on the same plot.
> There are 3 problems
Hi,
I have several time series that I need to plot on the same plot.
There are 3 problems with these series:
1. they do not start or end at the same times
2. they have different time intervals (seconds, minutes or hours)
3. they all have random missing time steps of a few step to longer
periods o
Here is an example given from
?yags
library(methods)
data(stackloss)
Y1 <- yags(stack.loss~Air.Flow,id=1:21, data=stackloss)
How can I access parts of the output.
I tried:
> str(Y1)
Formal class 'yagsResult' [package "yags"] with 25 slots
..@ coefficients : num [1:2] -44.13 1.02
..@
sorry guys. I have a cold and I am not thinking very clearly
On Wed, Oct 29, 2008 at 5:50 PM, stephen sefick <[EMAIL PROTECTED]> wrote:
> Title says it all remember cast() with sum as the aggregation function
>
> --
> Stephen Sefick
> Research Scientist
> Southeastern Natural Sciences Academy
>
>
thanks Rolf. Yes, I meant temp.R. I was going to use test.R but then
I realized that I already had a program named that. I think the R gods
are
really hating me !!! it's a very odd thing. I'll grep the file
because maybe the output is in there somewhere and i'm missing it ?
On Wed, Oct
Hi Phil: That's EXACTLY what it is. Thanks so much. It's nice to know
that the R Gods don't hate me. I hope it's okay that I'm going to cc
r-help
in case this thread comes up in the future and also so that other people
who might want to help know that it's solved. Thanks again.
On Wed, Oc
On 29/10/2008 4:39 PM, Alexy Khrabrov wrote:
I found there's a very good functional set of operations in R, such as
apply family, Hadley Wickham's lovely plyr, etc. There's even a
Reduce (a.k.a. fold). Now I wonder how can we do pattern-matching?
E.g., now I split dimensions like this:
Luis SAGAON TEYSSIER etumel.univmed.fr> writes:
>
> Dear all,
>
> I'm trying to estimate some parameters with the optim() function but I
> need to restrict one parameter and I have not found how to do it.
> Could you help me please?
Thought someone else would answer by now.
use the arg
Susana Zuloaga wrote:
Hello all
I am working with the package multcomp but I have problems with the function
simtest; the program say that can not find this function, nevertheless I doesn't have any problem with the function glht that it is in the same package.
Someone knows what could be t
On 30/10/2008, at 10:46 AM, [EMAIL PROTECTED] wrote:
I usually just run my R programs at the R command prompt but for my
latest one I want to save any output that gets written to the
screen so
I am
trying to use R CMD BATCH and send the output to an output file. I
realize I could use sink at
Title says it all remember cast() with sum as the aggregation function
--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us f
I usually just run my R programs at the R command prompt but for my
latest one I want to save any output that gets written to the screen so
I am
trying to use R CMD BATCH and send the output to an output file. I
realize I could use sink at the prompt but I'd rather try to do it this
way
becaus
On 30/10/2008, at 9:08 AM, Juliet Hannah wrote:
I have included data at the bottom of this email. It can be read in by
highlighting the data and then using this command: dat <-
read.table("clipboard", header = TRUE,sep="\t")
I can obtain solutions with both of these:
library(gee)
fit.gee<-gee
on 10/29/2008 03:57 PM Erin Hodgess wrote:
> Dear R People:
>
> Here is a toy example:
>
>> x <- c("2E","5W","12H")
>> substr(x,2,2)
> [1] "E" "W" "2"
>
> Sometimes x has 3 elements, sometimes 2. I want to extract the last
> element, and then extract the other 1 or 2 elements.
>
> How can I do
How about
> x <- c("2E","5W","12H")
> substr(x, nchar(x), nchar(x))
[1] "E" "W" "H"
>
> substr(x, 1, nchar(x)-1)
[1] "2" "5" "12"
-- David
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Erin Hodgess
Sent: Wednesday, October 29, 2008 3:58 PM
To: [EMA
Try this:
library(gsubfn)
## The last character
strapply(x, "(.)$", simplify = TRUE)
## The last two character
strapply(x, "(..)$", simplify = TRUE)
On Wed, Oct 29, 2008 at 6:57 PM, Erin Hodgess <[EMAIL PROTECTED]>wrote:
> Dear R People:
>
> Here is a toy example:
>
> > x <- c("2E","5W","12H"
Upon re-reading your question, I did not provide what you wanted.
In your example, 'x' is a character vector that has three elements.
Each element of 'x' has two or three characters. Now I think I see what
you want:
## untested, for the last character:
substr(x, nchar(x), nchar(x))
## untes
## untested
last <- tail(x, n = 1)
first <- head(x, n = length(x) - 1)
Erin Hodgess wrote:
Dear R People:
Here is a toy example:
x <- c("2E","5W","12H")
substr(x,2,2)
[1] "E" "W" "2"
Sometimes x has 3 elements, sometimes 2. I want to extract the last
element, and then extract the other 1
Dear R People:
Here is a toy example:
> x <- c("2E","5W","12H")
> substr(x,2,2)
[1] "E" "W" "2"
>
Sometimes x has 3 elements, sometimes 2. I want to extract the last
element, and then extract the other 1 or 2 elements.
How can I do this, please?
TIA,
Sincerely,
Erin
--
Erin Hodgess
Associa
I found there's a very good functional set of operations in R, such as
apply family, Hadley Wickham's lovely plyr, etc. There's even a
Reduce (a.k.a. fold). Now I wonder how can we do pattern-matching?
E.g., now I split dimensions like this:
m <- dim(V)[1] # R
n <- dim(V)[2
Sorry. I did not output the NAs correctly.
dat <- read.table("clipboard", header = TRUE)
id treat time1 time2 time3 time4 chem1 chem2 chem3 chem4 time score chem
1 1 20 18 15 15 1000 1100 1200 1300 0 20 1000
1 1 20 18 15 15 1000 1100 1200 1300 2 18 1100
1 1 20 18 15 15 1000 1100 1200 1300 3 15 12
?split.
Hadley
On Wed, Oct 29, 2008 at 3:22 PM, t c <[EMAIL PROTECTED]> wrote:
> I need some help with sub-setting my data. I am trying to divide a data
> frame into multiple data frames based on the year collected, and stored in a
> list with each new data frame labeled with "year X" where X
I need some help with sub-setting my data. I am trying to divide a data frame
into multiple data frames based on the year collected, and stored in a list
with each new data frame labeled with "year X" where X is the year the data was
collected. When I run my current code I get nine error messa
I have included data at the bottom of this email. It can be read in by
highlighting the data and then using this command: dat <-
read.table("clipboard", header = TRUE,sep="\t")
I can obtain solutions with both of these:
library(gee)
fit.gee<-gee(score ~ chem + time, id=id,
family=gaussian,corstr=
#How about this?
x1=6*(sin((0:100)*2*pi/100))+4
y1=6*(cos((0:100)*2*pi/100))+4
plot(x1,y1)
x2=c(1,9,3,4,8,4,2,0)
y2=c(3,6,8,2,4,1,9,6)
lines(x2,y2,type="b")
On Wed, Oct 29, 2008 at 2:48 PM, Alex99 <[EMAIL PROTECTED]> wrote:
>
> Hi there,
> I am trying to have a connectivity graph (two plots at on
On Wed, 29 Oct 2008 10:49:03 -0700,
Jeff Laake <[EMAIL PROTECTED]> wrote:
> Again thanks for the input. I've been a recipient of this list for
> quite a few years although I don't post often. It is an invaluable
> resource and I appreciate the effort of all the contributors. I
> support a lot o
Thanks a lot, Henrique and Christos!
It works fine
Quoting Christos Hatzis <[EMAIL PROTECTED]>:
> Udo,
>
> You can try inserting a newline where you need the break in your labels:
>
> > dd.names <- c('Conduct Disorders','Attention Deficit', 'Eating Disorders',
> 'Substance Abuse','Developme
Udo,
You can try inserting a newline where you need the break in your labels:
> dd.names <- c('Conduct Disorders','Attention Deficit', 'Eating Disorders',
'Substance Abuse','Developmental Disorders')
> dd.names.2 <- sapply(dd.names, function(x) gsub("\\s", "\\\n", x))
> barplot(dd, names.arg=dd.n
Try this:
nm <- c('Conduct Disorders','Attention Deficit', 'Eating
Disorders','Substance Abuse','Developmental Disorders')
barplot(dd, names.arg = gsub(" ", "\n", nm))
On Wed, Oct 29, 2008 at 4:43 PM, Udo <[EMAIL PROTECTED]> wrote:
> Dear List,
> I need a barplot with vertical bars. Each bar sho
Hi there,
I am trying to have a connectivity graph (two plots at once) in R:
this is an example:
x1=sin((0:100)*2*pi/100)
y1=cos((0:100)*2*pi/100)
plot(x1,y1)
will draw a circle and
x2=c(1,9,3,4,8,4,2,0)
y2=c(3,6,8,2,4,1,9,6)
plot(x2,y2,type="b")
will draw a graph with corresponding x's and
Dear List,
I need a barplot with vertical bars. Each bar should have a label.
The problem is, that the labels are too long, so they overlap, or
only every seccond label is displayed in the output.
Here is a little syntax:
dd <- c(100,110,90,105,95)
barplot(dd,names.arg=c('Conduct Disorders','Atte
Ok, I've placed the input files and the PDF on a website (I apologize
for attaching the PDF -- the readme guide for this listserv indicated
that PDFs were fine):
http://www.cstars.ucdavis.edu/~jongreen/temp/
The full suite of commands I used are:
tahoecontourdata<-read.csv("tahoedata02.csv",h
Dear friends
I am analysing the leaf expansion of a grass species and am interested in
the speed of expansion. I produced exponential models for each of the
treatments and got the equation for leaf size in function of time. I want to
compare the coeficients that gives the initial inclination of the
Hi,
I have a question about how I should report the results for a linear
mixed effects model where the model includes as predictors three
factors (facA, facB and facC), one of which (facA) interacts with the
other two. facA and facB have two levels and facC has 3 levels. There
are also several oth
Hi,
I would like to impose an inequality constraint on one of the regression
parameters of a panel linear model. How can I do that?
Thanks for your help,
Sara
_
[[elided Hotmail spam]]
[[alternative HTML version deleted]]
_
I have tried installing R on a web server on which I have a user
account but not root access.
I checked and the PERL, Fortran, etc. prerequisites all seem in order.
The compiling of R with:
% ./configure --with-x=no
This works fine without errors.
I try a "make check", however, and soon get a
Again thanks for the input. I've been a recipient of this list for
quite a few years although I don't post often. It is an invaluable
resource and I appreciate the effort of all the contributors. I support
a lot of software so I know how much work it can be.
I've seen the "reproducible code
Hi Markus,
is there a R function or package containing a similar functionality then
the SAS PROC SURVEYSELECT?
I think you need the sampling package
http://cran.r-project.org/web/packages/sampling/index.html
It is a package accompanying the book
Tillé, Y. (2006). Sampling Algorithms, New Yo
Dear R-users,
Using Maximum-likelihood Fitting (fitdistr function) I've got the next
error:
> fitdistr(datos,"weibull",lower=0)
Error in optim(x = c(1.4625e-06, 0.257854, 0.0001217545, 0.11421005,
0.028721576, :
L-BFGS-B *needs finite values of 'fn' *
where "datos" is a vector of length=1000
jim holtman wrote:
> I would guess that your separator is not really a tab like you think
> it is. Take a small subset of the data, bring it up in a text editor,
> check the contents and then try to read it. Always start small to see
> if it is working the way you think it should. Also it seem t
On Wed, Oct 29, 2008 at 06:19:51PM +0200, [EMAIL PROTECTED] wrote:
> I am having problems in reading appropriately a huge .prn file of almost
> 450.000 rows and 29 columns. The variables are consisted of characters,
> dates, time, numeric values. I use read.table("file.prn", header=F,
> sep="\t",
I would guess that your separator is not really a tab like you think
it is. Take a small subset of the data, bring it up in a text editor,
check the contents and then try to read it. Always start small to see
if it is working the way you think it should. Also it seem to have a
header, so why are
Hello,
is there a R function or package containing a similar functionality then
the SAS PROC SURVEYSELECT?
Thanks
Markus
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-pro
Hello,
I am having problems in reading appropriately a huge .prn file of almost
450.000 rows and 29 columns.
The variables are consisted of characters, dates, time, numeric values.
I use read.table("file.prn", header=F, sep="\t", na.strings="*"), where the
missing values are declared as "*".
Th
Hello all
I am working with the package multcomp but I have problems with the function
simtest; the program say that can not find this function, nevertheless I
doesn't have any problem with the function glht that it is in the same package.
Someone knows what could be the problem?
Thank you
Hello,
I've got a function that takes a numeric vector (x), computes a
transformation value (myAttr) for x, transforms x according to myAttr
and then sets myAttr as an attribute of x before returning x, so I can
easily know what myAttr was used (basically it's a power transformation
and myAttr is
?strptime gives the percent codes and R News 4/1 has an article
on dates with a table at its end containing many examples.
On Wed, Oct 29, 2008 at 11:03 AM, Santosh <[EMAIL PROTECTED]> wrote:
> Dear R experts..
>
> I am trying to understand what exactly strptime and strftime do...
> Where can I l
Dear R experts..
I am trying to understand what exactly strptime and strftime do...
Where can I look for the detailed notes on these two functions? In addition,
how POSIX functions like POSIXct and POSIXlt are used in these functions?
Regards,
Santosh
[[alternative HTML version deleted]]
Dear all,
Yes, indeed my knowledge in statistics is rather limited, but let me
reformulate my question. I have two samples (V1 and V2) of measurements of
observed physical values( v1_i and v2_i). Each value in the samples is
measured with an error (err_i), so it is in interval (v1_i-err_i,
v1_i+er
On Wed, Oct 29, 2008 at 3:45 PM, Erik Iverson <[EMAIL PROTECTED]> wrote:
>
>
> Leon Yee wrote:
>>
>> Gustaf Rydevik wrote:
>>> Hi Leon,
>>>
>>> unique(x)
>>>
>>> or
>>>
>>> duplicated(x)
>>>
>>> should work, depending on what you want.
>>>
>>> Best,
>>>
>>> Gustaf
>>>
>>
>> Hi,
>>Thank you all.
ear all,
This is my first time using this listserv and I am seeking help from the
expert. OK, here is my question, I am trying to use impute.knn function
in impute library and when I tested the sample code, I got the error as
followingt:
Here is the sample code:
library(impute)
data(khanmiss
Leon Yee wrote:
>
> Gustaf Rydevik wrote:
>> Hi Leon,
>>
>> unique(x)
>>
>> or
>>
>> duplicated(x)
>>
>> should work, depending on what you want.
>>
>> Best,
>>
>> Gustaf
>>
>
> Hi,
>Thank you all. Actually, I have a data frame or matrix, whose first
> column is numerical values, and whose 2
Dear Leon,
It's not the most efficient way but it works. Hopefully someone else will
come up with another approach. Here a toy example: 1. calculate the mean for
each name in your second column by using tapply or others, 2. determinate
which names are repeated >= 2 times, 3. match the names of the
Gustaf Rydevik wrote:
Hi Leon,
unique(x)
or
duplicated(x)
should work, depending on what you want.
Best,
Gustaf
Hi,
Thank you all. Actually, I have a data frame or matrix, whose first
column is numerical values, and whose 2nd column is names. I need those
whose names repeated 3 tim
On Wed, Oct 29, 2008 at 2:47 PM, Leon Yee <[EMAIL PROTECTED]> wrote:
> Dear all,
>
>How can I get the duplicated elements from a vector? For example,
> x <- c("yes", "no", "yes", "yes", "no", "not sure"), how can I filter out
> all the elements which occured >=2 times?
>
>Thanks for any hel
check duplicated(), e.g.,
x <- c("yes", "no", "yes", "yes", "no", "not sure")
x[duplicated(x)]
I hope it helps.
Best,
Dimitris
Leon Yee wrote:
Dear all,
How can I get the duplicated elements from a vector? For example,
x <- c("yes", "no", "yes", "yes", "no", "not sure"), how can I filt
?Filter ...
how did I miss that one?
Thanks, Gabor.
-Whit
On Wed, Oct 29, 2008 at 9:37 AM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> Try:
>
> ?Filter
>
> e.g.
>
> Filter(function(x) x > 0, x1)
>
> or using gsubfn's fn
>
> library(gsubfn)
> fn$Filter(~ x > 0, x1)
>
>
> On Wed, Oct 29, 20
Dear Leon,
Perhaps:
x <- c("yes", "no", "yes", "yes", "no", "not sure")
names(table(x))[table(x)>=2]
HTH,
Jorge
On Wed, Oct 29, 2008 at 9:47 AM, Leon Yee <[EMAIL PROTECTED]> wrote:
> Dear all,
>
>How can I get the duplicated elements from a vector? For example,
> x <- c("yes", "no", "ye
Dear all,
How can I get the duplicated elements from a vector? For example,
x <- c("yes", "no", "yes", "yes", "no", "not sure"), how can I filter
out all the elements which occured >=2 times?
Thanks for any help!
Regards,
Leon
__
R-help@r-p
Peter Dalgaard wrote:
>> Drats!! I almost thought that you had gotten a hold on the elusive
>> problem of estimating the population of R users
I suspect that the Higgs Boson will be observed well before we get
reasonable estimates on that figure...just need to get the LHC back
online...
;-)
Try:
?Filter
e.g.
Filter(function(x) x > 0, x1)
or using gsubfn's fn
library(gsubfn)
fn$Filter(~ x > 0, x1)
On Wed, Oct 29, 2008 at 9:06 AM, Whit Armstrong
<[EMAIL PROTECTED]> wrote:
> I know it's easy to write a simple loop to do this, but in the spirit
> of lapply, I thought I would ask i
Dear all,
I'm trying to estimate some parameters with the optim() function but I
need to restrict one parameter and I have not found how to do it.
Could you help me please?
my program is basically
fn<-function(s)
initial<-function(r)
{
cst<-r[1]
cst1<-r[2]
beta<-r[3]
rho<-r[4]
p1<-r[5]
r
The variable "iter" from read.table takes on values of 0,5,10,15, and 20. I
am trying to pick off values of iter by assigning it to "grp", and e.g.
iter<-5, then fill the x and y vectors and make plots of x,y for each value
of iter (>0)
For some reason all of the plots are the same, so I am not
Dear all,
This is my first time using this listserv and I am seeking help from the
expert. OK, here is my question, I am trying to use impute.knn function
in impute library and when I tested the sample code, I got the error as
followingt:
Here is the sample code:
library(impute)
data(khanmis
Dear Duncan, Ben and Megha
Thank you for your help! I tried
sudo apt-get build-dep r-cran-rgl
And so all necessitated package were installed and I could install rgl..
nice!
Mat
I believe the correct incantation is:
sudo apt-get build-dep r-cran-rgl
If that doesn't work, get back to us
Hi,
I believe Bart answered to your question. What is the solution you are
expecting? If you don't give us more explanations we cannot understand
what is wrong for you.
> help(sort)
|order| returns a permutation which rearranges its first argument into
ascending or descending order, breaking
Laura,
Order works fine. The output tells you that the third element of a is
the smallest, the first element is a second smallest, ... Try
a[order(a)] that should be equal to sort(a).
HTH,
Thierry
ir. Thierry Onkelin
I thought R users were measured in fractal dimensions...or is that fractious?
On Wed, Oct 29, 2008 at 4:06 AM, Detlef Steuer
<[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
>> >
>> > This is the bit where I get stuck.
>>
>> Drats!! I almost thought that you had got
I am using the order function and the result seems to be incorrect:
> a<-c(20,30,15,40)
> order(a)
[1] 3 1 2 4
Any suggestions?
Thanks,
Laura
--
View this message in context:
http://www.nabble.com/Incorrect-order-tp20224993p20224993.html
Sent from the R help mailing list archive at Nabble.c
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> >
> > This is the bit where I get stuck.
>
> Drats!! I almost thought that you had gotten a hold on the elusive
> problem of estimating the population of R users
>
We are legion! :-)
I admit: that doesn't help with calculations ...
Detlef
I know it's easy to write a simple loop to do this, but in the spirit
of lapply, I thought I would ask if there is a builtin to filter or
take a subset of a list based on a predicate in a similar way to the
Erlang lists:filter/2 function:
http://www.erlang.org/doc/man/lists.html#filter-2
filter(P
Hi,
I would like to know how to get the maximum possible values that can be used
for the dimensions of a device,
For example windows(h=,w=), what are the maximum values that I can pass as
parameters for w and h.
environment info:
platform: Windows XP SP2
R version: 2.7.1
Thanks
Nishan Sugat
[Using R 2.7.2 on Windows XP]
After re-building our heplots package, I've begun to get the following
error from sessionInfo(),
even though it passes R CMD check and builds without errors:
> sessionInfo()
Error in x$Priority : $ operator is invalid for atomic vectors
In addition: Warning message
For a good, extemely basic, tutorial see
http://www.math.ilstu.edu/dhkim/Rstuff/Rtutor.html
You might also want to have a look at
http://zoonek2.free.fr/UNIX/48_R/all.html
If you are familiar with SPSS or SAS then Bob Muenchen's paper in PDF form
http://oit.utk.edu/scc/RforSAS&SPSSusers.pdf (
> #this is my stab at - I am sure that I am missing something. If this
> doesn't make sense then please ask for more details. #This may show
> my low level of programing knowledge
>
> hester. <- c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4)
> value <- rnorm(16)
> x <- data.frame(value, hester.)
>
> z <-
> (
try this:
lapply(split(dat, dat$country), function (x) {
pres.test(x$pop1995, x$pop2000)
})
I hope it helps.
Best,
Dimitris
Corey Sparks wrote:
Dear list,
I have the function (as a simple example, which is actually part of a
larger function)
pres.test<-function(N0=N0, N1=N1)
{
dt<
Try this:
split(mapply(function(x, y)pres.test(x, y), DF$pop1995, DF$pop2000),
DF$country)
On Wed, Oct 29, 2008 at 10:19 AM, Corey Sparks <[EMAIL PROTECTED]>wrote:
> Dear list,
> I have the function (as a simple example, which is actually part of a
> larger function)
>
> pres.test<-function(N0=N
Dear useRs,
I am using the function tune.rpart() implemented in the e1071 package under
R 2.7.1 on Windows XP.
Sometimes, i.e., for some datasets, I get the following error:
> tune.rpart(dataset, data = dataset, cp = c(.005,.01,.02))
> Error in table(pred, true.y) : all arguments must hav
Dear list,
I have the function (as a simple example, which is actually part of a
larger function)
pres.test<-function(N0=N0, N1=N1)
{
dt<-5
r<-log(N1/N0)/dt
r
}
which calculates the annual growth rates in a population
Where N0 is the population classified into age intervals, say
Paul,
Look for the An Introduction to R on the CRAN - R web site. The latest
version, as far as I know, is Version 2.7.2 (2008-08-25). You might also
want to examine the R Data Import/Export doc
Both can be found here : http://cran.r-project.org/doc/manuals.html
Steve
Steve Friedman Ph. D.
Sp
'xin' is an element of a dataframe and you must explicity reference it
as such. See the Intro to R.
plot(mydata$xin, mydata$yin)
On Wed, Oct 29, 2008 at 4:29 AM, Leif Peterson <[EMAIL PROTECTED]> wrote:
> The summary stats for the xin and yin variables below are correct. However,
> if I use plo
What's wrong with that result?
you should look at the result as: first take the 3th element of a, then the
first one, than the second one and then the fourth.
if you do a[order(a)] then you get 15,20,30,40.
I suppose you expected:
rank(a)
[1] 2 3 1 4
Good luck
Bart
lll73 wrote:
>
>
> I am
Jonathan Greenberg ucdavis.edu> writes:
> ..faint internal grid when running the following command to make a
> filled contour plot of some data I have (x,y,z being the inputs):
>
>
filled.contour(interp(x,y,z,duplicate="strip",
xo=seq(1800,3200,length=57),
yo=seq(120,280,length=65)),
col=grey.
1 - 100 of 111 matches
Mail list logo