Hello Zhijie,
You can many specific commands and tricks by using R commander's menus:
install.packages(Rcmdr)
library(Rcmdr)
However, I can not stress enough that if you want to be proficient and
sound in your work with R, you will have to invest time reading the
documentation (see
Read the posting guide at http://www.R-project.org/posting-guide.html
and try the suggestions under Do your homework before posting: You
probably won't have to go past bullet 3 to find the answer to your
question.
Regards,
Francisco
Tobias Schlottmann wrote:
Hi there,
Is it
Hello Rainer,
You need to catch the cases where the call to plot generates an error.
Using your example:
## Set layout to three rows and only one column
par( mfcol=c(3,1), oma=c(0,0,0,0), mar=c(4, 4, 2, 2) )
## First row
par(mfg=c(1,1))
er-try( plot(runif(ff)), silent=T ) ## plot fails due to
pgamma(q=50,shape=5.1379,rate=0.017541)
Francisco
Jake Verschuyl wrote:
Hi there,
I have some bird flight height data that follows a gamma distribution. The
data (x) goes from 0 to 700 meters (n=1055). The calculated parameters
calculated from the fitdistr(x) are (shape =
fisher.test(tt)
Francisco
gallon li wrote:
Here is my table
tt
A B
1 297 398
2 470 376
3 30 23
4 3 3
5 0 0
b/c two cells are zero, I can't use chisq.test() in R which gives the
following output;
chisq.test(tt)
Pearson's Chi-squared test
data: tt
See ?table i.e.
x
sample # species
11 a
21 b
32 a
42 c
53 b
table(x)
species
sample # a b c
1 1 1 0
2 1 0 1
3 0 1 0
Regards,
Francisco
Francisco J. Zagmutt
[EMAIL PROTECTED] wrote
shape=mean^2/var
Remember the variance is equal to sd^2
I hope this helps,
Francisco J. Zagmutt
PS: Please read the posting guide (see the link at the bottom of this
email). It really helps people trying to help you :-)
Hadi Darzian Azizi wrote:
Hi there,
I am relatively new user of R. I
See ?relevel
Regards,
Francisco
Afshartous, David wrote:
All,
I'm using lmer for some repeated measures data and have specified
the contrasts for a time factor such that say time 3 is the base. This
works fine. However, when
I next use the subset argument to remove the last two
Hi Zeng,
I just glanced at the link, but I think this is what you are after:
x=rnorm(1000)#1000 random samples from N(0,1)
y=rlnorm(1000)#1000 random samples from Lognormal(0,1)
fx=ecdf(x)#Empirical cumulative density function of x
fy=ecdf(y)#Empirical cumulative density function of y
I think this will do what you want
x=c(1,2,3)
rep(x,x)
[1] 1 2 2 3 3 3
Regards
Francisco
M. P. Papadatos wrote:
Dear all,
I am trying to expand duplicated observations. I need to replace each
observation in the dataset with n copies of the observation, where n is
equal to the required
Also, look at options(digits) to set the number digits to be printed in
the console, i.e.
pi
[1] 3.141593
options(digits=22)
pi
[1] 3.141592653589793
Regards
Francisco
Roland Rau wrote:
李俊杰 wrote:
Dear R-lister,
One of my friends wanted to produce random number which is
But the dist object is not structured with rows and columns. i.e.
x=1:4
d=dist(x)
1 2 3
2 1
3 2 1
4 3 2 1
str(d)
Class 'dist' atomic [1:6] 1 2 3 1 2 1
..- attr(*, Size)= int 4
..- attr(*, Diag)= logi FALSE
..- attr(*, Upper)= logi FALSE
..- attr(*, method)= chr euclidean
..-
There are many ways to do this.
The first that comes to my mind is sample(c(1,-1),100,TRUE). Notice
that sample also has a prob argument that may be useful for you.
Francisco
Anup Nandialath wrote:
Dear Friends,
I'm trying to generate a sequence of 100 observations
with either a 1 or
This reference may be relevant for you: Connover, W.J., Iman, R.L. A
distribution-free approach to inducing rank correlation among input
variables. Technometric, 3, 311-334, 1982.
Also, you may want to look at a more modern approach implemented in the
copula package:
install.packages(copula)
. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
Christian Schulz wrote:
Hi,
im little bit confused about Cohen's Kappa and i should be look into the
Kappa function code. Is the easy formula really wrong?
kappa=agreement-chance/(1-chance
Please remember to add a sample of reproducible code when you post to
this list (as recommended in the posting guide).
You probably want to use the lattice package i.e.
library(lattice)
?bwplot
Francisco
Ellen Husain wrote:
Hi all,
I'm sure this is reallly basic, but I just can get it
assuming your data is called dat, you can use:
tapply(dat$sc, INDEX=list(p=dat$p, aa=dat$aa), var)
see ?tapply and ?var
I hope this helps
Francisco
Aimin Yan wrote:
I have data like this
aap sc
met p1 34
met p1 56
met p2 45
met p2 33
ser p1 34
ser p1 56
ser p2
I use thunderbird as my newsreader and I see the thread just fine. So,
don't worry, nobody has deleted what you regard as a useful contribution.
Regards
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
Tom Backer Johnsen
Or alternatively you can use xlsReadWrite package
install.packages(xlsReadWrite)
library(xlsReadWrite)
read.xls(sampledata.xls)
Regards,
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
Gabor Grothendieck wrote:
You need
Regards
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Milton Cezar Ribeiro [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] identify extremes positions of values into matrix
Date: Fri, 3 Nov 2006 11:25:32
(simecol)
library(simecol)
?simecol
Regards,
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Milton Cezar Ribeiro [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] Individual Based Model and/or Cellular
dt calculates the density function from the student's t distribution. If
you want to perform a standard t-test you may want to look at the t.test()
function included in the stats package.
Cheers,
Francisco
From: [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: Re: [R] ncp in dt
searching through
R's documentation and the forum archives you still can't find a way to
perform the calculation, then is time to get back to this forum.
Regards,
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Ethan
)
Cheers,
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Chuck Cleland [EMAIL PROTECTED]
To: Ethan Johnsons [EMAIL PROTECTED]
CC: r-help@stat.math.ethz.ch
Subject: Re: [R] binom.test
Date: Thu, 19 Oct 2006 11:27:35 -0400
To add to the nice explanation by Marc, you can access the source directly
from the web at https://svn.r-project.org/R/trunk/src/main/random.c
If you prefer to look directly in the source tarball, notice the file is
called random.c
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary
this helps
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Zembower, Kevin [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] Newbie: Selecting data
Date: Thu, 19 Oct 2006 16:12:54 -0400
I've been working
Try RSiteSearch(rotate barplot labels)
Then read the first thread for an example of what you want to do.
Cheers
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Leeds, Mark (IED) [EMAIL PROTECTED]
To: R-help
assistance.
Best regards,
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Vladimir Eremeev [EMAIL PROTECTED]
Reply-To: Vladimir Eremeev [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] strange error in mtrace
Take a look at make.positive.definite in the corpcor package. The
implementation is very similar to what Duncan suggested.
Regards,
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Duncan Murdoch [EMAIL PROTECTED
?text
?plotmath
Cheers
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Torsten Mathies [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] Write a summary or a longer text to a graphical device
Date: Thu, 13
comments are more than
appropriate. I am surprised nobody else jumped with the usual discussion
about violin plots and his friends ;-)
Cheers
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Martin Maechler [EMAIL
matrix
[1] TRUE
I hope this helps
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Cuau [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] reading a matrix from a file
Date: Tue, 27 Jun 2006 08:06:36 -0700 (PDT
the observations for each patient by subetting your data
by the K variable. See ?[ for more details on subsetting.
I hope this helps
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Afshartous, David [EMAIL PROTECTED
))
#Creates contingency table of categories
tab=table(rain)
#Plots frequencies of rainfall
barplot(tab)
I hope this helps!
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: etienne [EMAIL PROTECTED]
To: r-help
(100))
#Creates table
tab=table(dat$Type, cut(dat$Age,seq(0,1,.02)))
You can use the labels argument within cut to get a more pretty output
I hope this helps
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: lalitha
Look at ?class and perhaps is?. i.e.
x=c(1,2,3)
class(x)
[1] character
x=c(1,2,3)
class(x)
[1] numeric
I hope this helps
Francisco
Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University
From: Alex Restrepo [EMAIL PROTECTED]
To: r-help
48 129
4111 42 122
5222 30 121
6333 43 129
7111 44 122
8222 43 121
9333 38 129
Cheers
Francisco
From: Guenther, Cameron [EMAIL PROTECTED]
To: Francisco J. Zagmutt [EMAIL PROTECTED]
Subject: RE: [R] Unique?
Date: Thu, 11 May 2006
See ?rle i.e.:
x=c(0,0,1,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,0)
rle(x)
Run Length Encoding
lengths: int [1:7] 2 3 1 3 1 4 5
values : num [1:7] 0 1 0 1 0 1 0
I hope this helps
Francisco
From: Jean-Pierre GERBAL [EMAIL PROTECTED]
To: R-help@stat.math.ethz.ch
Subject: [R] count repetitions
Date:
Dear David
I suspect you downloaded 'foreign' but you didn't load it to your workspace.
To do that you have to use library(foreign). Then you can have access to
the functions in that package.
In addition to the manuals that come with R (Help-Manuals (in pdf)) there
is a wealth of reading
If you only care about the sum of CONVUNIT by each TRIPID then you can use
tapply i.e.:
step4-data.frame(TRIPID=rep(c(111,222,333),3),CONVUNIT=rpois(9,40))
result-tapply(step4$CONVUNIT,INDEX=step4$TRIPID,FUN=sum)
result
111 222 333
115 107 123
Is this what you wanted to do? I can't think of
And adding to Jim's solution, you may be able to further improve the speed
of your code by pre-allocating the list size i.e
result - vector(list,100)
for (i in 1:100){
result[[i]] - data.frame(id=sample(letters,1), value=i)
}
newDataFrame - do.call('rbind', result)
Cheers
Francisco
From:
them look a bit too thick, and if
I use 1.5 it makes no difference. i.e
par(mfrow=c(2,2))
plot(sin,lwd=1)#Too thin
plot(sin,lwd=1.5)#Same as lwd=1
plot(sin,lwd=1.99)#Same as lwd=1
plot(sin,lwd=2)#Too thick
Regards
Francisco
From: Prof Brian Ripley [EMAIL PROTECTED]
To: Francisco J. Zagmutt
Dear all
Is there a way or trick in windows to plot a line width that is not an
integer i.e 1.5?
I am aware that the documentation for window devices states Line widths as
controlled by par(lwd=) are in multiples of the pixel size, and multiples
1 are silently converted to 1 but I was
Is this what you are after?
floor(data[,model.list])
Or I just didn't understand what you are trying to accomplish?
cheers
Francisco
PS: try to avoid using names that are already reserved to a function like
data See ?data
From: Chad Reyhan Bhatti [EMAIL PROTECTED]
To:
RSiteSearch(debug) or RSiteSearch(debugging) will give you a lot or
relevant information. I personally use library(debug) extensivelly and it
should do all the taks you asked about. There is a nice article describing
the debug lilbrary in the 2003/3 issue of R News
Please consider using R's built-in help capabilities before posting a
question.
help.search(McNemar)
RSiteSearch(McNemar)
Regards
Francisco
From: XinMeng [EMAIL PROTECTED]
Reply-To: XinMeng [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] about McNemar
Date: Thu, 13 Apr 2006
This is not a very generic option, but for your example you can use unique
and cbind to create a new dataframe with the results i.e
a-c(1,2,3,1,5)
b-c(2,2,2,2,2)
c-c(2,3,4,2,6)
f=as.integer(table(paste(a,b,c)))#Stores only frequency
data.frame(unique(cbind(a,b,c)),freq=f)
a b c freq
1 1 2 2
Why are you trying to extract the values by calling a function with the name
of the value? glm objects are stored as a list i.e.
str(pAmeir_1)
Hence, you can extract what you need by selecting the values on the list
i.e.
pAmeir_1$df.null
pAmeir_1$null.deviance
Cheers
Francisco
From:
Hi Dennis
Out of curiosity, how did you import the pdf to Power Point? I am running
windows so it may be different (and completelly irrelevant to you!) but when
I want to place a pdf image in a PPT slide I copy the file to the clipboard
and then paste it in Power Point. Then in Power Point
Hi Linda
Did you already get a reply to your question? If not, try adding a new line
at the end of the text (just hit enter after 69,the last number in your data
and save the file). You also want to use the argument sep in read.table
Since you have a comma at the end of each row you can
RSiteSearch(KS ties) turned this:
http://finzi.psych.upenn.edu/R/library/Matching/html/ks.boot.html
Does this help?
Best
Francisco
From: Steve Su [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] Modified KS test to handle ties.
Date: Wed, 22 Mar 2006 11:28:06 +1100
Dear All,
I
Hi Sam
If you are new to R it will definitively pay off to start from the basics.
Go to the help menu- manuals in pdf and select An Introduction to R.
After you read that document you will be able to answer your questions :-)
Good luck!
Francisco
From: Sam Steingold [EMAIL PROTECTED]
I am missing somehting, but what is it??
Thanks
Francisco
From: Gabor Grothendieck [EMAIL PROTECTED]
To: Francisco J. Zagmutt [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], r-help@stat.math.ethz.ch
Subject: Re: [R] difference between 2 dates: IN MONTHS the way
Motherscompute it
Date: Fri, 10 Mar 2006
that to as.yearmon.
On 3/12/06, Francisco J. Zagmutt [EMAIL PROTECTED] wrote:
Thanks Gabor, that's what I understood but then why do I get these
results?
library(zoo)
12*as.numeric(as.yearmon(2006-03-07)-as.yearmon(2006-02-07))
[1] NA
Warning messages:
1: NAs introduced by coercion
2: NAs
Gabor, please correct me if I am wrong but shouldn't you use as.Date to
change the date string to a Date class before you call as.yearmon? i.e.
12*
as.numeric(as.yearmon(as.Date(2006-03-07))-as.yearmon(as.Date(2006-02-07)))
That returns 1 in Windows XP
Regards
Francisco
From: Gabor
RSiteSearch(trim) or RSiteSearch(trim space) will get you there.
Francisco
From: Dan Chan [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] trimming a factor
Date: Fri, 10 Mar 2006 15:52:03 -0500
Hi,
I have the following dataframe. The County Column has many empty spaces
at the end.
a = c(1,2,3)
a
[1] 1 2 3
rev(a)
[1] 3 2 1
PS: a in your example is not a list; i.e class(a)
From: Omar Lakkis [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] shift / rota
Date: Thu, 9 Mar 2006 15:51:51 -0500
How to do a shift/rotate os a list?
if
a = c(1,2,3)
what is the best way
Take a look at ?identify
Francisco
From: Anne Katrin Heinrichs [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] labelling dots in plots
Date: Wed, 15 Feb 2006 18:43:20 +0100
Hello,
I would like to label outliers (or all dots) in a plot
plot(as.matrix(ValAddInd_byYear),
Take a look at the facilities to write HTML output in library(R2HTML). If
you write an HTML file, you can then easily copy and paste it into your Word
document, or from MS Word you can use the Insert menu. i.e.
library(R2HTML)
x=ftable(Titanic, row.vars = 1:3)
HTML(x,Titanic.html)
Then from
library(boot)
?city
Francisco
From: Kuba [EMAIL PROTECTED]
To: R-help@stat.math.ethz.ch
Subject: [R] explanation of data sets variables
Date: Wed, 08 Feb 2006 00:35:51 +0100
Dear all,
where I can find explanation of data sets variables, for
example what does (u,x) variables means in city
After you create your xyplot use
library(grid)
panel.text(grid.locator(),label=My label)
Cheers
Francisco
PS: How is good ol' David these days?
From: Dean Sonneborn [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] footnote in postscript lattice
Date: Thu, 26 Jan 2006 15:46:28
If it hasn't been mentioned yet, and if you want to consider this as a
separate discipline from the ones mentioned below, we also use it for
simulation modeling and risk analysis.
Francisco
From: John Maindonald [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] In which application
An example would have helped to give you a better answer. You can use
characters in the seq argument of the for loop. i.e
x=letters[1:4]
x
[1] a b c d
for(i in x) {print(i)}
[1] a
[1] b
[1] c
[1] d
Is this what you were looking for?
Francisco
From: Chia, Yen Lin [EMAIL PROTECTED]
To:
Did you try RSiteSearch(zero-inflated)?
Francisco
From: Katrin Bernath [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] Poisson and negative binomial models with truncation
Date: Mon, 16 Jan 2006 14:15:14 +0100
I am fitting count data models with zero-truncated data.
Are there
If you have a slow connection and/or you don't want to download the entire
source code you can find the sources for R on this site
https://svn.r-project.org/R/trunk/
Francisco
From: Liaw, Andy [EMAIL PROTECTED]
To: 'Yingfu Xie' [EMAIL PROTECTED], r-help@stat.math.ethz.ch
Subject: Re: [R] Can
]
To: 'Francisco J. Zagmutt'
[EMAIL PROTECTED],[EMAIL PROTECTED],r-help@stat.math.ethz.ch
Subject: RE: [R] Can I ask for the C code inside an R function using .C?
Date: Fri, 13 Jan 2006 13:26:02 -0500
Just wondering: How do people with slow connections get R? The Windows
binary is about 25MB, while
If I understand your question, to superimpose two lines in a same plot, in
the first call to plot() you want to set the plot(ylim) argument with a
range that will fit both of your lines. Then use lines() to add the second
lowess line on the plot. Or matplot() will automate the process for
axis.break() in the plotrix package will do that. You still have to modify
the axis scale.
Cheers
Francisco
From: jobst landgrebe [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] discontinuous y-axis (ordinate with a -/ /-)
Date: Thu, 17 Nov 2005 11:40:01 +0100
Dear List,
Hi Gesman
There may be more elegant ways to do this but here is one option:
d=data.frame(crit1=gl(2,5), crit2=factor(letters[1:10]), x=rnorm(10))
#Creates data
levels(d$crit2)=c(levels(d$crit2),Small)#Adds the level Small to the
factor crit2.
d2=d[order(d$crit1,d$x),]#Sorts x ascending, by
Looking at the results that you are expecing I think that you just want to
have only the record from black colored people. If that't the case, for
this dataset the easiest way is to subset the data i.e
data(HairEyeColor)
x=as.data.frame(HairEyeColor)
x2=x[x$Hair==Black,1:3]
x2
Hair Eye
Examples of the code you used would have helped i.e. We don't know how you
transposed your matrix. Did you use t()? In any event, as.integer() may be
what you need.
Francisco
From: Illyes Eszter [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] how to convert strings back to
It depends on what you want to do. There are many spatial packages that can
be used for a variety of epidemiological analyses. Take a look at this link
http://sal.uiuc.edu/csiss/Rgeo// for a nice summary of the current spatial
tools in R.
If you are looking for something that will perform
What error are you getting? What did you try? If you want to get
meaningful help you need to provide examples of what you did and didn't
work.
Read the bottom of the message that you just sent and you will notice that
we ask you to read the posting guide
Cheers
Francisco
From: Andreas
From: Duncan Murdoch [EMAIL PROTECTED]
To: bob mccall [EMAIL PROTECTED]
CC: r-help@stat.math.ethz.ch r-help@stat.math.ethz.ch
Subject: Re: [R] frequency() source code
Date: Mon, 07 Nov 2005 18:30:25 -0500
On 11/7/2005 6:11 PM, bob mccall wrote:
Greetings:
I am looking for the
To plot two Kernel densities you can use matplot:
x1-density(rnorm(100))
x2-density(rnorm(100))
matplot(cbind(x1$y,x2$y), type=l)
Or if both distributions are really very similar and you don't have to
adjust the axes you can simply use
plot(x1)
lines(x2, col=red)
Finally if you want to have
Hi Leaf
The word even can be interpreted in several ways but I will give it a
shot.
If you want to specify the breakpoints to represent the aggregation in your
data you can use the argument breaks within histogram i.e.
x=c(runif(95,0,0.2),runif(5,.21,2))
hist(x, breaks=seq(0,2,.1), freq=F )#It
Please read the documentation before posting a question. If you read the
documentation for sm.density you will see that the argument props will do
what you want. i.e.
y - cbind(rnorm(50), rnorm(50))
sm.density(y, display = slice, props=95)
Regards
Francisco
From: Cunningham Kerry [EMAIL
check ?dput and ?dget
Cheers
Francisco
From: [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] how to write and read an array ?
Date: Thu, 27 Oct 2005 19:00:10 +0200
Hi,
Apologies if the question is too simple
but I didn't find the answer by myself.
I'm able to create a
I addition to all the many good options presented you can also use
trimWhiteSpace{limma} which is just a higher level call to sub()
x=scan(clipboard, what=character)
Read 6 items
x
[1] AIR ABCB ABXA ACMR ADCT ADEX
trimWhiteSpace(x)
[1] AIR ABCB ABXA ACMR ADCT ADEX
Cheers
Francisco
Are you trying to obtain the MLE parameter estimates? If so, in your
example you just need to use fit$par.
Cheers
Francisco
From: Elizabeth Lawson [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] goodfit par estimates
Date: Thu, 20 Oct 2005 10:37:19 -0700 (PDT)
Hey,
Does anyone
x=runif(100,0,40)
hist(x, breaks=c(0,1,2,3,4,5,6,7,8,9,10,40))
Is this what you had in mind?
Francisco
From: Florian Defregger [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] histogram - one bin for all values larger than a certain value
Date: Mon, 26 Sep 2005 15:36:21 +0200
Dear
you just said t. identical() will compare *strict* equality
i.e.
d1=data.frame(x=,y=1:30)
d2=d1
identical(d1,d2)
[1] TRUE
d1=data.frame(x=letters,y=1:26)
d2=data.frame(x=c(aa,letters[2:26]), y=1:26)
identical(d1,d2)
[1] FALSE #because The first row of d2$x was aa and in d1 was a
Cheers
To be more precise, when using hist(prob=T) the y axis shows the densities.
If you want relative frequencies (proportions) you can use the histogram(x,
type=) function in the package lattice or write your own function.
Cheers
Francisco
From: Vincent Goulet [EMAIL PROTECTED]
Reply-To:
or getAnywhere()
From: ronggui.wong [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch r-help@stat.math.ethz.ch
Subject: Re: [R] accessing source code in R packages
Date: Thu, 22 Sep 2005 10:03:45 +0800
R is open source. You can download the source code from CRAN.
RSiteSearch(Dagum)
Francisco
From: Uri Iskin [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] help with estimating parameters with nls
Date: Tue, 20 Sep 2005 15:44:07 -0300
Dear helpeRs,
I have a vector containing values of incomes and I would like to estimate
the three parameters
Adding to Uwe's comment, in my experience is also useful to use a text
editor that connects to R (i.e. in Windows you have Tinn-R, jgr, SciViews)
so people can see the function arguments as they type. People are
accustomed to this feature from Excel so it helps them to fell more
comfortable
Or the longer version help(Boston)
Cheers
Francisco
From: Gabor Grothendieck [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Jun Ding [EMAIL PROTECTED]
CC: r-help@stat.math.ethz.ch
Subject: Re: [R] Variable descriptions of a built-in dataset
Date: Sun, 18 Sep 2005 01:33:15 -0400
?Boston
On
Hi Michael
An example of your list would have helped. Anyhow, why do you want to read
a list? If you created a list object in R and want to save it and then read
it back in other session or in some other time a good option is to write an
ASCII representation of the object using dput and then
Somebody already did the job for you. Try fitdistr{MASS} i.e.
x=scan(clipboard)#Read your data from clipboard
sh=(mean(x))^2/var(x)
sc=var(x)/mean(x)
fitdistr(x,gamma, list(shape=sh, scale=sc))
Now you probably know that you have to be carfeul when estimating
distribution parameters from such
Follow this thread
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/50598.html
Cheers
Francisco
From: Laurent TESSIER [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] R API call from delphi
Date: Thu, 8 Sep 2005 17:47:49 +0200 (CEST)
Hello,
Has anyone
Check some of the threads at RSiteSearch(Hotelling)
Cheers
Francisco
From: Bill Donner [EMAIL PROTECTED]
To: R-help@stat.math.ethz.ch
Subject: [R] Hotelling Test
Date: Wed, 7 Sep 2005 06:48:06 -0700 (PDT)
Hello R-users,
I've been looking for a function performing one and two sample Hotelling
I don't have much experience in the subject but it seems that library(akima)
should be useful for your problem. Try library(help=akima) to see a list
of the functions available in the library.
I hope this helps
Francisco
From: Gabor Grothendieck [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Others may propose more elegant solutions but, in windows one quick an dirty
option would be to change the argument 'pin' and 'fin' within par to get an
image of exactly 1 inch (2.54 cm) i.e.
y - c(40, 46, 39, 44, 23, 36, 70, 39, 30, 73, 53, 74)
x - c(6, 4, 3, 6, 1, 5, 6, 2, 1, 8, 4, 6)
Hi Doran
The documentation for isTRUE reads 'isTRUE(x)' is an abbreviation of
'identical(TRUE,x)' so actually Vincent's solutions is cleaner than using
identical :)
Cheers
Francisco
From: Doran, Harold [EMAIL PROTECTED]
To: [EMAIL PROTECTED], r-help@stat.math.ethz.ch
Subject: Re: [R]
I don't run R on Linux but my first suggestion would be to download the
latest version of R and if you still observe the problem post a new thread
with specific code examples.
Cheers
Francisco
From: Karen L. Updegraff [EMAIL PROTECTED]
Reply-To: Karen L. Updegraff [EMAIL PROTECTED]
To:
You can also specify weights in sm.density() in the package sm.
Cheers
Francisco
From: Prof Brian Ripley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: r-help@stat.math.ethz.ch
Subject: Re: [R] kernel smoothing of weighted data
Date: Tue, 16 Aug 2005 18:13:43 +0100 (BST)
density() in the R-devel
Try accesing http://search.r-project.org/ directly or within R using
RSiteSearch(utils). It is not the same site that you are asking for but you
will find very useful information there (including a link to Robert King's
archives).
Francisco
From: White, Charles E WRAIR-Wash DC [EMAIL
Why are you adding as.integer before the factor statement? You are forcing
the variable to be an integer even tough you are passing factor within the
statement. Try
Lease$ID -factor(Lease$EarlyTermination)
Cheers
Francisco
From: Haibo Huang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject:
What platform are you working on? On windows you can also create an
animated gif file using ImageMagik (http://www.imagemagick.org/) from the
cmd or you can use the more user friendly UnFREEz downloadable at
http://www.whitsoftdev.com/unfreez/ ot Microsoft GIF animator(search for it
on
Ups! Mr. Ripley is right. I ignored the OS in the posting. My appologies
to Tom Isenbarger for the misleading answer.
Regards
Francisco
From: Prof Brian Ripley [EMAIL PROTECTED]
To: Francisco J. Zagmutt [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], r-help@stat.math.ethz.ch
Subject: Re: [R
1 - 100 of 143 matches
Mail list logo