Re: [R] Is there any good tools to facilitate us to create R functions?

2007-08-17 Thread Francisco J. Zagmutt
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

Re: [R] Quadratic Programming

2007-08-17 Thread Francisco J. Zagmutt
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

Re: [R] several plots on several pages - bug in par(mfg())?

2007-08-17 Thread Francisco J. Zagmutt
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

Re: [R] CDF of a gamma distribution

2007-08-14 Thread Francisco J. Zagmutt
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 =

Re: [R] test for contingency table when there are many zeros

2007-08-08 Thread Francisco J. Zagmutt
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

Re: [R] presence/absence matrix

2007-07-20 Thread Francisco J. Zagmutt
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

Re: [R] random number generation

2007-07-18 Thread Francisco J. Zagmutt
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

Re: [R] maintaining specified factor contrasts when subsetting in lmer

2007-07-06 Thread Francisco J. Zagmutt
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

Re: [R] probabilty plot

2007-07-05 Thread Francisco J. Zagmutt
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

Re: [R] Expand duplicated observations

2007-06-05 Thread Francisco J. Zagmutt
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

Re: [R] the biggest integer R can display in complete form but not scientific form

2007-06-05 Thread Francisco J. Zagmutt
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

Re: [R] how to get column/row info from a dist object?

2007-05-11 Thread Francisco J. Zagmutt
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 ..-

Re: [R] Random Sequence

2007-04-12 Thread Francisco J. Zagmutt
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

Re: [R] generating lognormal variables with given correlation

2007-03-23 Thread Francisco J. Zagmutt
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)

Re: [R] Cohen's Kappa

2007-03-22 Thread Francisco J. Zagmutt
. 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

Re: [R] why are my multiple box whisker plots so small?

2006-12-13 Thread Francisco J. Zagmutt
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

Re: [R] estimate variance

2006-12-12 Thread Francisco J. Zagmutt
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

Re: [R] I do not understand this

2006-12-07 Thread Francisco J. Zagmutt
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

Re: [R] How to use read.xls in R

2006-12-07 Thread Francisco J. Zagmutt
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

Re: [R] identify extremes positions of values into matrix

2006-11-03 Thread Francisco J. Zagmutt
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

Re: [R] Individual Based Model and/or Cellular automata

2006-11-02 Thread Francisco J. Zagmutt
(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

Re: [R] ncp in dt

2006-11-01 Thread Francisco J. Zagmutt
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

Re: [R] binom.test

2006-10-20 Thread Francisco J. Zagmutt
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

Re: [R] binom.test

2006-10-19 Thread Francisco J. Zagmutt
) 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

Re: [R] Question about random sampling in R

2006-10-19 Thread Francisco J. Zagmutt
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

Re: [R] Newbie: Selecting data

2006-10-19 Thread Francisco J. Zagmutt
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

Re: [R] barplot question

2006-10-17 Thread Francisco J. Zagmutt
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

Re: [R] strange error in mtrace

2006-10-17 Thread Francisco J. Zagmutt
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

Re: [R] positive semi-definite matrix

2006-07-21 Thread Francisco J. Zagmutt
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

Re: [R] Write a summary or a longer text to a graphical device

2006-07-13 Thread Francisco J. Zagmutt
?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

Re: [R] distribution of daily rainfall values in binned categories

2006-06-28 Thread Francisco J. Zagmutt
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

Re: [R] reading a matrix from a file

2006-06-27 Thread Francisco J. Zagmutt
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

Re: [R] supplying dynamic main argument to plot?

2006-06-27 Thread Francisco J. Zagmutt
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

Re: [R] distribution of daily rainfall values in binned categories

2006-06-27 Thread Francisco J. Zagmutt
)) #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

Re: [R] Query about getting a table of binned values

2006-06-20 Thread Francisco J. Zagmutt
(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

Re: [R] Determine the data type of a function to an argument

2006-06-20 Thread Francisco J. Zagmutt
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

Re: [R] Unique?

2006-05-11 Thread Francisco J. Zagmutt
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

Re: [R] count repetitions

2006-05-11 Thread Francisco J. Zagmutt
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:

Re: [R] Now another question regarding the Foreign package

2006-05-11 Thread Francisco J. Zagmutt
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

Re: [R] Unique?

2006-05-10 Thread Francisco J. Zagmutt
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

Re: [R] Concatenating data frame

2006-05-10 Thread Francisco J. Zagmutt
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:

Re: [R] lwd - Windows

2006-04-26 Thread Francisco J. Zagmutt
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

[R] lwd - Windows

2006-04-25 Thread 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

Re: [R] the difference between x1 and x1

2006-04-20 Thread Francisco J. Zagmutt
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:

Re: [R] R debugging options

2006-04-17 Thread Francisco J. Zagmutt
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

Re: [R] about McNemar

2006-04-12 Thread Francisco J. Zagmutt
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

Re: [R] Determining frequancy of events

2006-04-02 Thread Francisco J. Zagmutt
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

Re: [R] Glm poisson

2006-03-27 Thread Francisco J. Zagmutt
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:

Re: [R] transparent background for PDF

2006-03-24 Thread Francisco J. Zagmutt
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

Re: [R] new to R

2006-03-23 Thread Francisco J. Zagmutt
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

Re: [R] Modified KS test to handle ties.

2006-03-21 Thread Francisco J. Zagmutt
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

Re: [R] removing NA from a data frame

2006-03-17 Thread Francisco J. Zagmutt
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]

Re: [R] difference between 2 dates: IN MONTHS the way Motherscompute it

2006-03-12 Thread Francisco J. Zagmutt
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

Re: [R] difference between 2 dates: IN MONTHS the way Motherscompute it

2006-03-12 Thread Francisco J. Zagmutt
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

Re: [R] difference between 2 dates: IN MONTHS the way Motherscompute it

2006-03-10 Thread Francisco J. Zagmutt
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

Re: [R] trimming a factor

2006-03-10 Thread Francisco J. Zagmutt
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.

Re: [R] shift / rota

2006-03-09 Thread Francisco J. Zagmutt
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

Re: [R] labelling dots in plots

2006-02-15 Thread Francisco J. Zagmutt
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),

Re: [R] Tranferring R results to word prosessors

2006-02-09 Thread Francisco J. Zagmutt
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

Re: [R] explanation of data sets variables

2006-02-07 Thread Francisco J. Zagmutt
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

Re: [R] footnote in postscript lattice

2006-01-26 Thread Francisco J. Zagmutt
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

Re: [R] In which application areas is R used?

2006-01-23 Thread Francisco J. Zagmutt
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

Re: [R] Loop through factors without changing to numerics

2006-01-19 Thread Francisco J. Zagmutt
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:

Re: [R] Poisson and negative binomial models with truncation

2006-01-16 Thread Francisco J. Zagmutt
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

Re: [R] Can I ask for the C code inside an R function using .C?

2006-01-13 Thread Francisco J. Zagmutt
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

Re: [R] Can I ask for the C code inside an R function using .C?

2006-01-13 Thread Francisco J. Zagmutt
] 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

Re: [R] How to plot two dataset in one fig?

2005-11-18 Thread Francisco J. Zagmutt
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

Re: [R] discontinuous y-axis (ordinate with a -/ /-)

2005-11-17 Thread Francisco J. Zagmutt
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,

Re: [R] change some levels of a factor column in data frame according to a condi

2005-11-14 Thread Francisco J. Zagmutt
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

Re: [R] how to make automatically each level from data.frame to vector

2005-11-12 Thread Francisco J. Zagmutt
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

Re: [R] how to convert strings back to values?

2005-11-09 Thread Francisco J. Zagmutt
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

Re: [R] spatial epidemiology

2005-11-08 Thread Francisco J. Zagmutt
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

Re: [R] someone knows how to title a image.plot() in a layout?

2005-11-07 Thread Francisco J. Zagmutt
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

Re: [R] frequency() source code

2005-11-07 Thread Francisco J. Zagmutt
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

Re: [R] newbie graphics question: Two density plots in same frame ?

2005-11-03 Thread Francisco J. Zagmutt
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

Re: [R] breaks in hist()

2005-11-02 Thread Francisco J. Zagmutt
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

Re: [R] question about sm.density

2005-10-28 Thread Francisco J. Zagmutt
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

Re: [R] how to write and read an array ?

2005-10-27 Thread Francisco J. Zagmutt
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

Re: [R] Can anyone please tell me how to strip the white spaces from acharacter

2005-10-25 Thread Francisco J. Zagmutt
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

Re: [R] goodfit par estimates

2005-10-20 Thread Francisco J. Zagmutt
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

Re: [R] histogram - one bin for all values larger than a certain value

2005-09-26 Thread Francisco J. Zagmutt
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

Re: [R] Identical data frames

2005-09-21 Thread Francisco J. Zagmutt
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

Re: [R] Add function to histogram?

2005-09-21 Thread Francisco J. Zagmutt
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:

Re: [R] accessing source code in R packages

2005-09-21 Thread Francisco J. Zagmutt
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.

Re: [R] help with estimating parameters with nls

2005-09-20 Thread Francisco J. Zagmutt
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

Re: [R] Teaching R - In front of the computer?

2005-09-19 Thread Francisco J. Zagmutt
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

Re: [R] Variable descriptions of a built-in dataset

2005-09-18 Thread Francisco J. Zagmutt
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

Re: [R] Scan and Lists

2005-09-14 Thread Francisco J. Zagmutt
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

Re: [R] fit data with gammadistribution

2005-09-12 Thread Francisco J. Zagmutt
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

Re: [R] R API call from delphi

2005-09-08 Thread Francisco J. Zagmutt
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

Re: [R] Hotelling Test

2005-09-07 Thread Francisco J. Zagmutt
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

Re: [R] Interpolating / smoothing missing time series data

2005-09-07 Thread Francisco J. Zagmutt
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]

Re: [R] Creating very small plots (2.5 cm wide) in Sweave

2005-09-07 Thread Francisco J. Zagmutt
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)

Re: [R] Testing if all elements are equal in a vector/matrix

2005-08-29 Thread Francisco J. Zagmutt
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]

Re: [R] multiple plots in png output

2005-08-19 Thread Francisco J. Zagmutt
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:

Re: [R] kernel smoothing of weighted data

2005-08-16 Thread Francisco J. Zagmutt
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

Re: [R] Archive Search on R Help Mailing List Help

2005-08-06 Thread Francisco J. Zagmutt
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

Re: [R] Convert numeric to factor

2005-08-03 Thread Francisco J. Zagmutt
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:

Re: [R] HOW to Create Movies with R with repeated plot()?

2005-07-27 Thread Francisco J. Zagmutt
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

Re: [R] poisson fit for histogram

2005-07-25 Thread Francisco J. Zagmutt
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   2   >