Hi there,
currently, I've updated R on my Mac (OS X) to version 2.10. I was
wondering if I have to install all additional packages again???
In Windows, I just needed to copy the library folder of the old
installation but how does it work with Mac?
Can anybody give me a hint?
Antje
_
Hi all:
I finished cox analysis like this:
fit_cox<-coxph(Surv(dat$Time, dat$death) ~ dat$CD4 +
strata(dat$gender),data=dat);
> fit_cox
Call:
coxph(formula = Surv(data_ori$Time, data_ori$death) ~ data_ori$drug +
strata(data_ori$gender), data = data_ori)
coef exp(coef) se(co
I am using numerical optimization to fit a 1 parameter model, in which the
input parameter is bounded. I am currently using optimize(), however, the
problem turns out to have local minima, and optimize does not always seem to
find the global minimum. I could to write a wrapping function that tries
hi,
I want to do hierarchical clustering with Jaccord index. I tried to do with
vegan package for finding index and hierarchical clustering with hclust
function. While doing clustering it is showing an error message as "invalid
distance method". I would be grateful if anyone tells how to rectify
> On Nov 2, 2009, at 10:40 PM, Ben Bolker wrote:
> > with the following simple data frame
> > dd = structure(list(z = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L
> > ), .Label = c("a", "b"), class = "factor"), x = c(0.3, 0.2, 0.1,
> > 0, 0, 0, 0.2, 0.3)), .Names = c("z", "x"), row.names = c(NA,
> >
First of all, let me confess that I am a newbie to R and don't know
much about the language or the environment. We have a need for
plugging in R in our production runtime and need the ability to pull
data out of our existing services. I am trying to see if I can take
advantage of SSOAP such that we
Hello all,
I used google and looked at the documentation to find out why the
ADONIS function
is called adonis (in the vegan package).
I am writing a document and would like to include a
abbreviation list (similar to "ANOSIM = Analysis of Similarities").
regards,
Steve
On Nov 2, 2009, at 10:40 PM, Ben Bolker wrote:
with the following simple data frame
dd = structure(list(z = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L
), .Label = c("a", "b"), class = "factor"), x = c(0.3, 0.2, 0.1,
0, 0, 0, 0.2, 0.3)), .Names = c("z", "x"), row.names = c(NA,
-8L), class = "d
Hi Henrik and David,
Thank you very much for your suggestions. I found both meet my needs.
In the following code, I found save(obj,file=pathname) would save the
content into an object called obj.
path <- "~/";
dir.create(path);
for (i in 1:10) {
assign( paste("m", i, sep=""), i:5)
filena
Hi R users:
I am using RODBC to create some new ".xls" files each with
several sheets (about 100) with sqlSave() from a data.frame
inside R without any problem, but on windows XP platform.
I would like to know if it is posible to make a similar
solution on linux with openoffice?
RODBC work onl
with the following simple data frame
dd = structure(list(z = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L
), .Label = c("a", "b"), class = "factor"), x = c(0.3, 0.2, 0.1,
0, 0, 0, 0.2, 0.3)), .Names = c("z", "x"), row.names = c(NA,
-8L), class = "data.frame")
I would like know if it's possible
On Nov 2, 2009, at 8:00 PM, j daniel wrote:
Greetings,
I am not familiar with processing text in R. Can someone tell me
how to
read each line of words as separate elements in a list?
FE, I would like to turn:
word1 word2 word3
word2 word4
into a list of length two with three character
Is this what you want:
> x <- readLines(textConnection("word1 word2 word3
+ word2 word4"))
> closeAllConnections()
> yourList <- strsplit(x, '[[:space:]]+')
>
>
> yourList
[[1]]
[1] "word1" "word2" "word3"
[[2]]
[1] "word2" "word4"
>
On Mon, Nov 2, 2009 at 8:00 PM, j daniel wrote:
>
> Greetin
Greetings,
I am not familiar with processing text in R. Can someone tell me how to
read each line of words as separate elements in a list?
FE, I would like to turn:
word1 word2 word3
word2 word4
into a list of length two with three character elements in the first list
and two elements in the
I'm working on a small project to extract high-frequency terms from a
document and then display those terms in web page. To this end, I've to pass
the file name as parameter to the Corpus function to build a corpus of only
one document. I can build the corpus using the code below interactively in
Dear R-help,
I am trying to perform residual diagnostics on a repeated measures mixed
effect model. With 3 time points as the fixed effect and subjects as the
random effects.
> time.linearc<- summary(lmer(cnim~(as.factor(time)), random= ~1|subj,
data=ex.rmc, na.action=na.omit))
> time.linearc
try
sort (table(MAT), decreasing=T)
if MAT is your matrix
I think this is what you want. though if you want to sort by the first
occurrence then it is a different story.
Nikhil
On 2 Nov 2009, at 1:35PM, Val wrote:
V1 v2 v3 v4
569 10
347 10
46 10 18
Hi,
I am interested to use Kernel Density Estimation on bivariate data for
multi-class classification.
So far, I have managed to use the 'ks' package to plot the contours of the
kernel density estimates based on 8-class training dataset with only 2
variables.
However, I do not know how to m
Sure, but it seems like the point of the time series class is so you don't
have to create a factor based on the period of sampling. Is there anyway of
imposing calculations like median on the time series class, or is Kjetil's
suggestion the only approach?
Thanks!
On Sun, Nov 1, 2009 at 4:09 PM, K
Try this:
> x[, colnames(x) != 'a']
[1] 3 4
On Tue, Nov 3, 2009 at 9:31 AM, Peng Yu wrote:
> I can exclude columns by column number using '-'. But I wondering if
> there is an easy way to exclude some columns by column names.
>
>> x=cbind(c(1,2),c(3,4))
>> x
> [,1] [,2]
> [1,] 1 3
> [2,
Hi Peng,
Here is a suggestion:
subset(x, select = -a)
See ?subset for more details.
HTH,
Jorge
On Mon, Nov 2, 2009 at 8:31 PM, Peng Yu <> wrote:
> I can exclude columns by column number using '-'. But I wondering if
> there is an easy way to exclude some columns by column names.
>
> > x=cbin
I can exclude columns by column number using '-'. But I wondering if
there is an easy way to exclude some columns by column names.
> x=cbind(c(1,2),c(3,4))
> x
[,1] [,2]
[1,]13
[2,]24
> colnames(x)=c('a','b')
> x
a b
[1,] 1 3
[2,] 2 4
> x[,-'a']
Error in -"a" : invalid ar
Dave,
You should look at the train() function in teh caret package.
Max
On Mon, Nov 2, 2009 at 6:01 PM, Armitage, Dave wrote:
> Greetings,
>
> I am having trouble calculating artificial neural network misclassification
> errors using errorest() from the ipred package. I have had no problems
> e
Dear Carol,
> -Original Message-
> From: carol white [mailto:wht_...@yahoo.com]
> Sent: November-02-09 4:04 PM
> To: 'Peter Flom'; John Fox
> Cc: r-h...@stat.math.ethz.ch; 'Yihui Xie'
> Subject: RE: [R] qqplot
>
> Thanks for all your replies.
>
> I just wanted to compare the distribution
The first thing I would suggest is convert your dataframes to matrices
so that you are not having to continually convert them in the calls to
the functions. Also I am not sure what the code:
realized_prob = with(DF, {
ind <- (CHOSEN == 1)
Hi,
I noticed that you are setting very small tolerance as convergence
criterion. In most optimization problems, it does not make much practical
sense to set such a low tolerance. If you increase this, then `constrOptim'
also works. For example,
constrOptim(theta=theta.0, f=likelihood, grad=scor
Greetings,
I am having trouble calculating artificial neural network
misclassification errors using errorest() from the ipred package.
I have had no problems estimating the values with randomForest()
or svm(), but can't seem to get it to work with nnet(). I believe
this is due to the output o
Hi Davidov,
You can use the `constrOptim.nl' function that I have written for solving
problems like yours. It is better and more general than the `constrOptim'
function. It is able to solve your problem, but I am not sure how well
posed your problem is. One of the parameters seems to go to 0.
Dear Users,
I would like to simulate an AR(1) (y_t=ct1+y_t-1+e_t) model in R where the
innovations are supposed to follow a t-GARCH(1,1) proccess.
By t-GARCH I want to mean that:
e_t=n_t*sqrt(h_t) and
h_t=ct2+a*(e_t)^2+b*h_t-1.
where n_t is a random variable with t-Student distribution.
If s
Dear Users,
I would like to simulate AR(1) (y_t=ct1+y_t-1+e_t) model in R where the
innovations are supposed to follow a t-GARCH(1,1) proccess.
By t-GARCH I want to mean that:
e_t=n_t*sqrt(h_t) and
h_t=ct2+a*(e_t)^2+b*h_t-1.
If someone could give some guidelines, I can going developing the mo
I use
indata = read.csv(file.choose(),header=TRUE)
of course you can specify your file.
Joe King
206-913-2912
j...@joepking.com
"Never throughout history has a man who lived a life of ease left a name
worth remembering." --Theodore Roosevelt
-Original Message-
From: r-help-boun...@r-p
On Monday 02 November 2009 13:41:45 Prof Brian Ripley wrote:
> On Mon, 2 Nov 2009, Johannes Graumann wrote:
> > Hmmm ... that should do it, thanks. But how would one use this on a file
> > without reading it into memory completely?
>
> ?file, ?readLines, ?readBin
>
> will tell you about connectio
David, Eduardo,
Thanks for the code. I have run it and I'm not sure what to do with the
graph when it comes up. Can I interact with it, such as an RGL graph? I've
tried clicking or dragging with the mouse and nothing happens. My system is
a Windows Vista and R2.9.
Best,
Iuri.
On Mon, Nov 2, 200
On Nov 2, 2009, at 4:09 PM, Fang (Betty) Yang wrote:
Dear all,
I'd like to ask help on R code to get the same results as the
following
Splus code:
indata<-importData("/home/data_new.csv")
indata[1:5,4]
[1] 0930 1601 1006 1032 1020
I tried the following R code:
indata<-read.csv("/h
Superficially, one answer is
indata <- read.csv("/home/data_new.csv", colClasses="character")
but I'm not sure that's what you want...
-Ista
On Mon, Nov 2, 2009 at 4:09 PM, Fang (Betty) Yang wrote:
> Dear all,
>
>
>
> I'd like to ask help on R code to get the same results as the following
> Sp
The attached file did not come through to the list. I think you have
some non-standard characters (or at least non-standard in my locale).
I was able to get the code to run after using the Zap Gremlins
function in TextWrangler. Prior to that "treatment" pretty much every
line threw an error
See the nlme library and accompanying book by Pinheiro and Bates. The
lme function is appropriate for linear mixed models with normal
errors, and the 'weights' argument provides flexible methods for
modeling error heterogeneity.
hth,
Kingsford
On Mon, Nov 2, 2009 at 12:10 PM, jinyan fan wrote:
Hi
I need to find the Hessian matrix for a complicated function from a certain
kind of data but i keep getting this error
Error in f1 - f2 : non-numeric argument to binary operator
the data is given by
U<-runif(n)
Us<-sort(U)
tau1<- 2
F1tau<- pgamma((tau1/t
Dear all,
I'd like to ask help on R code to get the same results as the following
Splus code:
>indata<-importData("/home/data_new.csv")
>indata[1:5,4]
[1] 0930 1601 1006 1032 1020
I tried the following R code:
> indata<-read.csv("/home/data_new.csv")
> indata[1:5,4]
[1] 9
Thanks for all your replies.
I just wanted to compare the distributions of two populations and see how
different they are. I thought that QQplot would be a good idea. It's true that
the mean and sd of the two distributions are not the same. I don't know if any
other method or graphical presenta
I send r-code in an attached file.
2009/11/2 Iuri Gavronski :
> Eduardo,
>
> Would you mind sending me the R code in an attached file. Your code didn't
> work here and I am not sure it is because of line breaks from the email
> program.
>
> Iuri.
>
> On Mon, Nov 2, 2009 at 10:53 AM, eduardo san mi
I'm wondering if there is a textbook that summarize the methods on
adjusting p-values for multiple comparisons. Most of the references on
p.adjust() are over 10 years old. I feel it would be better if
somebody could recommend me a textbook on multiple hypothesis
correction, so that I can quickly ge
On Nov 2, 2009, at 2:49 PM, Jorge Ivan Velez wrote:
Hi Ashta,
Yes, it is possible. Here is a suggestion:
# Data set
x <- read.table(textConnection("v1 v2 v3 v4
569 10
347 10
46 10 18"), header = TRUE)
closeAllConnections()
# Table
res <- table(data.matrix(x))
On Mon, Nov 2, 2009 at 10:56 AM, Jonathan Greenberg
wrote:
> R-helpers:
>
> I'm working on an r-package that I want to make as easy-to-use as possible
> for a novice R-user, which includes automatically installing required
> packages. I, myself, am a novice R-packager, so the solution I came u
James,
I think those are Unix commands? I'm on Windows, so that's not an option
(for now)
Also the suggestions posed by Duncan and Phil seem to be working. Thank you
so much, such a simple thing to add the "r" or "rt" to the file connection.
I read about blocking, but I didn't imagine that it
Hi Koraelus,
Here is a suggestion for the first part:
index <- apply(Dataset, 1, function(x) sum( is.na( x ) ) < 2 )
d2 <- Dataset[index ,]
d2
# Alpha Beta Gamma Delta
# A 12 3 4
# BNA2 4 5
# D 891011
# E 5 NA 713
Could you please ex
Hello
On 11/2/09, jinyan fan wrote:
> to address this issue, either by some sort of Robust ANOVA procedure, or by
> some alternative tests? Thanks a lot.
>
I cannot address this specific question, but you may want to address
robustness-related queries to r-sig-robust, and perhaps check the
Robus
Hi Ashta,
Yes, it is possible. Here is a suggestion:
# Data set
x <- read.table(textConnection("v1 v2 v3 v4
569 10
347 10
46 10 18"), header = TRUE)
closeAllConnections()
# Table
res <- table(data.matrix(x))
f <- sort(res, decreasing = TRUE)
data.frame(value = na
Hi Gene,
Rather than using R to parse this file, have you considered using either
grep or sed to pre-process the file and then read it in?
It looks like you just want lines starting with numbers, so something like
grep '^[0-9]\+' thefile.csv > otherfile.csv
should be much faster, and then yo
On 11/2/2009 2:03 PM, Gene Leynes wrote:
I've been trying to figure out how to read in a large file for a few days
now, and after extensive research I'm still not sure what to do.
I have a large comma delimited text file that contains 59 fields in each
record.
There is also a header every 121 re
Thank you Jorge and
> res <- table(unlist(x))
> res[order(res, decreasing = TRUE)]
> # 10 4 6 3 5 7 9 18
> # 3 2 2 1 1 1 1 1
This one works fine for me. Is it possible to transpose it?
I tried t(res[order(res, decreasing = TRUE)]), but it did not work!
I want the result like this
Let's say I have a dataset
Dataset<-read.csv("Dataset.txt", header=T, row.names=1)
Dataset
Alpha Beta Gamma Delta
A 1 23 4
B NA24 5
C NA3NA NA
D 8 9 10 11
E5 NA 713
F NANA NA 4
I
Dear Colleagues,
I am running a three-way mixed-design ANOVA, with one manipulated IV, a group
membership IV, and pre-/post- within subject factor. I am interested in the
three-way interaction effect. The regular ANVOA is problematic, because (a) the
sample sizes are very unbalanced, due to th
I've been trying to figure out how to read in a large file for a few days
now, and after extensive research I'm still not sure what to do.
I have a large comma delimited text file that contains 59 fields in each
record.
There is also a header every 121 records
This function works well for smallis
If you package "depends" on another package, it will be automatically installed.
Hadley
On Mon, Nov 2, 2009 at 12:56 PM, Jonathan Greenberg
wrote:
> R-helpers:
>
> I'm working on an r-package that I want to make as easy-to-use as possible
> for a novice R-user, which includes automatically ins
On 2/11/2009, at 5:27 PM, Erin Hodgess wrote:
Dear R People:
I have the output from an arima model fit in an object xxx.
I want to verify that the ma1 coefficient is there, so I did the
following:
xxx$coef
ar1ar2ma1 intercept
1.3841297 -0.4985667 -0.996 -0.109
R-helpers:
I'm working on an r-package that I want to make as easy-to-use as
possible for a novice R-user, which includes automatically installing
required packages. I, myself, am a novice R-packager, so the solution
I came up with was to embed:
print("Loading required packages...")
if
sorry, I forgot to send my reply to the list, I got to remember to hit reply
all:
So I set up a dummy matrix, v1,v2,v3,v4, an datamatrix
v1 = c(5,3,4)
v2 = c(6,4,6)
v3 = c(9,7,10)
v4 = c(10,10,18)
datamatrix=c(v1,v2,v3,v4)
then do
sort(table(datamatrix))
Joe King
206-913-2912
j...@joepking.co
Hi Val,
Here is a suggestion:
res <- table(unlist(x))
res[order(res, decreasing = TRUE)]
# 10 4 6 3 5 7 9 18
# 3 2 2 1 1 1 1 1
HTH,
Jorge
On Mon, Nov 2, 2009 at 1:35 PM, Val <> wrote:
> BAYESIAN INFERENCES FOR MILKING TEMPERAMENT IN CANADIAN HOLSTEINS
>
> Hi All,
>
> I have a da
Jack:
You are confused!
You have specified that the factor is ordered (ordered = TRUE), so you do
_not get_ the (6, not 7 btw)single degree of freedom contrasts corresponding
to weekday names. Instead you get the (default) contrasts for an ordered
factor (.L = linear, .Q = quadratic, etc.). Also
BAYESIAN INFERENCES FOR MILKING TEMPERAMENT IN CANADIAN HOLSTEINS
Hi All,
I have a data set "x" with several variables. Sample of the data is shown
below
V1 v2 v3 v4
569 10
347 10
46 10 18
I want the frequency of each data point sorted by their occ
Hi,
I am trying to write a function to compute many cross-tabulations with the
-svytable- command. Here is a simplified example of the structure of my code
(adapted from the -svytable- help file):
data(api)
func.example<-function(variable){
dclus1<-svydesign(id=~1, weights=~pw,data=apiclus1
I am a long time user of R for financial time series analysis (xts, zoo,
etc) and for my next project I am thinking of adding the Python language to
the mix. The reason for adding Python is primarily its non-statistical
capabilities.
So my questions are what have people's experiences been with usi
Hi,
I apologize for the long message but the problem I encountered can't be stated
in a few lines.
I am having some problems with the function constrOptim. My goal is to maximize
the likelihood of product of K multinomials, each with four catagories under
linear constraints on the parameter va
I am attempting to clean up some land use building data and need to join some
buildings together making sure not to double count GIS slivers. The first
data.frame is the original, the 2nd adds all the acres for each identical
bldgid. I now want to
a) throw out all but one of the the cases where
Wow,
That's nice.
Should work well, but I just realized that I missed something in
explaining my code.
I need to calculate the exp function on X
so it should be
exp(x) / sum(exp(x)) for each group
I tried this with:
foo <- ave(rawdata$foo,rawdata$code,FUN=function(x) exp(x) / sum(exp(x)))
Peter Ehlers wrote
>
>That's not what qqline() does and for good reason - it treats
>x and y asymmetrically.
>
>But qqline() is a very simple function, using the quartiles
>as also suggested by John. Here's a modified version that
>should work for Carol:
>
>qqline2 <- function (x, y, ...)
>{
>
John Fox wrote
>
>I assumed that Carol wanted to compare the shapes of the distributions and
>to adjust for differences in centre and spread. To put a line through the
>quartiles or to base a line on the medians and IQRs is more robust than
>using the means and sds.
>
Hi John
Indeed it is.
It al
Dear Peter,
I assumed that Carol wanted to compare the shapes of the distributions and
to adjust for differences in centre and spread. To put a line through the
quartiles or to base a line on the medians and IQRs is more robust than
using the means and sds.
Best,
John
> -Original Message--
Peter Flom wrote:
David Winsemius wrote
I always assumed that the intercept was zero and the slope = unity.
y <- rt(200, df = 5)
qqnorm(y); qqline(y, col = 2)
qqplot(y, rt(300, df = 5))
abline(0, 1, col="red")
Suppose you have the following
x <- rnorm(500)
y <- 500*(x + runif(500, 0,1)
jeffc wrote:
>
> Hi,
>
> I would like to save a few dynamically created objects to disk. The
> following is the basic flow of the code segment
>
> for(i = 1:10) {
>m = i:5
>save(m, file = ...) ## ???
> }
> To distinguish different objects to be saved, I would like to save m as
> m1, m
carol white wrote
>So the conclusion is that abline(0,1) should always be used and if it doesn't
>go through the qqplot, the two distributions are not similar?
I think it depends what you mean by "similar". E.g., if you mean "are both of
these distributions (e.g.) normal?" then abline(0,1) is
David Winsemius wrote
>I always assumed that the intercept was zero and the slope = unity.
>
> y <- rt(200, df = 5)
> qqnorm(y); qqline(y, col = 2)
> qqplot(y, rt(300, df = 5))
> abline(0, 1, col="red")
>
Suppose you have the following
x <- rnorm(500)
y <- 500*(x + runif(500, 0,1))
qqplot(x,
So the conclusion is that abline(0,1) should always be used and if it doesn't
go through the qqplot, the two distributions are not similar?
Thanks
--- On Mon, 11/2/09, Yihui Xie wrote:
> From: Yihui Xie
> Subject: Re: [R] qqplot
> To: "carol white"
> Cc: "David Winsemius" , r-h...@stat.math.
abline(0,1) is somewhere in the upper-left corner which you are unable
to see. At least the first distribution seems to have a larger mean
than the second one (i.e. they are not the same distribution).
Regards,
Yihui
--
Yihui Xie
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics
bbslover wrote:
>
> In my disk C:/ have a a.csv file, I want to read it to R, importantly,
> when I use x=read.csv("C:/a.csv") ,the x format is data.frame, I want
> to it to become matrix format, how can I do it ?
>
as.matrix should do the job; if it does not (second example), you proba
I am a long time user of R for financial time series analysis (xts, zoo,
etc) and for my next project I am thinking of adding the Python language to
the mix. The reason for adding Python is primarily its non-statistical
capabilities.
So my questions are what have people's experiences been with usi
if I have the two following matrices, abline(0,1) doesn't go through. QQplot is
attached.
[,1] [,2] [,3] [,4] [,5]
2.149644 1.992864 3.346375 2.793511 3.428230
1.100762 2.152981 2.735401 2.175185 3.323058
1.212406 2.131813 2.672598 2.389996 3.242490
1.183770 1.908633
Carol,
You could run a line through the pairs of first and third quartiles of the
two distributions, i.e., c(quantile(x, .25), quantile(y, .25)) and
c(quantile(x, .75), quantile(y, .75)). (Of course, you'd want the line to
extend across the whole graph.)
I hope this helps,
John
> -Original
Jen-Chien and Adaikalavan,
Weekday is specified as an ordered factor, for which the default contrast
type is contr.poly, i.e., orthogonal-polynomial contrasts. I would have
expected a 6th-degree polynomial for the 7 days of the week, and there's a
message that suggests that 3 coefficients are alia
On Nov 2, 2009, at 10:40 AM, carol white wrote:
Hi,
We could use qqplot to see how two distributions are different from
each other. To show better how they are different (departs from the
straight line), how is it possible to plot the straight line that
goes through them? I am looking for
Is this what you want: depends on it occurring at the endo of the string:
> grep("\\.x[^x]*$",c("a.x" ,"b.x","a.xx"),value=TRUE)
[1] "a.x" "b.x"
On Mon, Nov 2, 2009 at 9:57 AM, Vito Muggeo (UniPa)
wrote:
> dear all,
> This is a probably a silly question.
> If I type
>> grep("x",c("a.x" ,"b.x",
Hi,
We could use qqplot to see how two distributions are different from each other.
To show better how they are different (departs from the straight line), how is
it possible to plot the straight line that goes through them? I am looking for
some thing like qqline for qqnorm. I thought of abline
All:
Attached is the output file from building R 2.10.0 on RedHat Linux. I
have never previously experienced any problems when building R from
source with new releases. But, now I get a compile error with the Matrix
package:
CHOLMOD/Include/cholmod.h:87:22: error: UFconfig.h: No such file or
On Nov 2, 2009, at 9:57 AM, Vito Muggeo (UniPa) wrote:
dear all,
This is a probably a silly question.
If I type
> grep("x",c("a.x" ,"b.x","a.xx"),value=TRUE)
[1] "a.x" "b.x" "a.xx"
> grep("\\.x\\b",c("a.x" ,"b.x","a.xx"),value=TRUE)
[1] "a.x" "b.x"
Or:
> grep("\\.x$",c("a.x" ,"b.x","a.xx")
An example will help show the difference between single vs. double brackets.
## xl is a list with three elements
xl <- list( a=1:3, b=2:7, c=c('X','Y'))
xl
$a
[1] 1 2 3
$b
[1] 2 3 4 5 6 7
$c
[1] "X" "Y"
## with single brackets, we get a subset. A subset of a list is still a list
xl[
It would be useful to say which package the object SJ comes from or
provide a more reproducible example.
Assuming that Demand variable is continuous and you are fitting a
standard lm() model, then your results looks suspicious. Where are the
coefficients for Month, Holiday, Season?
Jen-Ch
On Sun, Nov 1, 2009 at 9:01 AM, wenjun zheng wrote:
> Hi R Users,
> When I use package lme4 for mixed model analysis, I can't distinguish
> the significant and insignificant variables from all random independent
> variables.
> Here is my data and result:
> Data:
>
> Rice<-data.frame(Yield
Hi,
Try this,
x = rnorm(1)
y = rnorm(1)
leg = bquote(r^2*"="*.(round(x,digits=3))*", P="*.(round(y, digits=3)))
plot.new()
legend (bty ="n","topright",legend=leg)
HTH,
baptiste
2009/11/2 Jacob Kasper :
> I know that this has been revisited over and over, yet I cannot figure out
> how to solve
Jacob Kasper wrote:
> I know that this has been revisited over and over, yet I cannot figure out
> how to solve this case of superscript troubles...
> I would like the 2 in r2 to be superscript, yet I am pasting text before and
> after it. I have tried several variations but have not solved this ye
On Nov 2, 2009, at 8:40 AM, Maya Pfaff wrote:
Dear R experts
I am running a negative-binomial GLM (glm.nb) to test the null
hypotheses
that species 1 and 2 are equally abundant between site 1 and site2,
and
between each other. So, I have a 2x2 factorial design with factors
Site
(1,2) an
I know that this has been revisited over and over, yet I cannot figure out
how to solve this case of superscript troubles...
I would like the 2 in r2 to be superscript, yet I am pasting text before and
after it. I have tried several variations but have not solved this yet, any
suggestions?
legend
Hi,
I am wondering if there is a simple way to fix the problem I am having.
For unknown reason, I could not get the full name of the factors to be
printed in the summary. I have tried to used summary.lm as well but the
problem still persists.
SJ$Weekday <-
factor(SJ$Weekday,1:7,c("Mon","Tue
This would return a vector the names of objects whose names begin with
"fund":
ls()[grep("^fund", ls())]
I'm such a grep-noob that I don't know off the top of my head what the
pattern should be to restrict it to only those objects with digits in
the next position.
Perhaps:
do.call( "rbin
dear all,
This is a probably a silly question.
If I type
> grep("x",c("a.x" ,"b.x","a.xx"),value=TRUE)
[1] "a.x" "b.x" "a.xx"
Instead, I would like to obtain only
"a.x" "b.x"
How is it possible to get this result with grep()?
many thanks for your attention,
best,
vito
--
It's a way of extracting from a list. See help("[") or help("Extract").
dadrivr wrote:
Great, that works very well. What is the purpose of double brackets vs
single ones? I will remember next time to include a subset of the data, so
that readers can run the script. Thanks again for your hel
It's a way of extracting from a list. See help("[") or help("Extract")
Regards, Adai
dadrivr wrote:
Great, that works very well. What is the purpose of double brackets vs
single ones? I will remember next time to include a subset of the data, so
that readers can run the script. Thanks again
Great, that works very well. What is the purpose of double brackets vs
single ones? I will remember next time to include a subset of the data, so
that readers can run the script. Thanks again for your help!
Benilton Carvalho wrote:
>
> it appears that what you really want is to use:
>
> ta
r-help.20.trevva wrote:
>
> Dear R-ers,
>
> I'm not sure if this is a missing feature, a support request, or stupidity
> on my part, but nevertheless, its a question. Is it possible to add titles
> to colorkey legends? As far as I can tell, there is a command to do it for
> normal "key" legend
Dear R experts
I am running a negative-binomial GLM (glm.nb) to test the null hypotheses
that species 1 and 2 are equally abundant between site 1 and site2, and
between each other. So, I have a 2x2 factorial design with factors Site
(1,2) and Taxon (1,2).
Since the Site:Taxon interaction is signif
1 - 100 of 129 matches
Mail list logo