Re: [R] Tables: Invitation to make a collective package

2005-07-07 Thread Gabor Grothendieck
If the functionality you are thinking of already exists across multiple packages an alternative to creating a new package would be to create a task view as in: http://cran.r-project.org/src/contrib/Views/ as explained in the ctv package and the article in R News 5/1. On 7/7/05, Jose Claudio

Re: 答复: 答复: [R] fail in add ing library in new version.

2005-07-07 Thread Gabor Grothendieck
- 发件人: Gabor Grothendieck [mailto:[EMAIL PROTECTED] 发送时间: 2005年6月6日 10:21 收件人: Ivy_Li 抄送: r-help@stat.math.ethz.ch 主题: Re: [R] fail in adding library in new version. On 6/5/05, Ivy_Li [EMAIL PROTECTED] wrote: Hello everybody, Could I consult you a question? I always use

Re: 答复: 答复: [R] fail in add ing library in new version.

2005-07-07 Thread Gabor Grothendieck
On 7/7/05, Uwe Ligges [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: On 7/7/05, Uwe Ligges [EMAIL PROTECTED] wrote: Ivy_Li wrote: Dear all, I have done every step as the previous mail. 1. unpack tools.zip into c:\cygwin 2. install Active perl in c:\Perl 3. install

Re: [R] plotting on a reverse log scale

2005-07-07 Thread Gabor Grothendieck
it for review/critique. The 'max.pow' constant can be explicitly adjusted or can be calculated automatically based upon input year ranges. Best regards, Marc Schwartz On Wed, 2005-07-06 at 17:31 -0400, Gabor Grothendieck wrote: Not sure if I am missing something essential here

Re: [R] How do you sort a data frame on a selection of columns?

2005-07-07 Thread Gabor Grothendieck
On 7/7/05, Briggs, Meredith M [EMAIL PROTECTED] wrote: This is what to start with: Data Frame A BC D c1 4 y 5 c3 6 d 7 c1 5 t 6 Now sort on A then C This is what to

Re: [R] fail in adding library in new version.

2005-07-07 Thread Gabor Grothendieck
is wrong? Thanks a lot! BG Ivy_Li -原始邮件- 发件人: Gabor Grothendieck [mailto:[EMAIL PROTECTED] 发送时间: 2005年7月7日 20:57 收件人: Uwe Ligges 抄送: Ivy_Li; r-help@stat.math.ethz.ch 主题: Re: 答复: 答复: [R] fail in adding library in new version. On 7/7/05, Uwe Ligges [EMAIL PROTECTED] wrote

Re: [R] fail in adding library in new version.

2005-07-07 Thread Gabor Grothendieck
There is also an even larger source of examples at: http://cran.r-project.org/src/contrib/Descriptions/ although the built caveat mentioned below applies here as well. On 7/7/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: You cannot use an empty DESCRIPTION file. To get more info

Re: [R] Plotting a simple subset

2005-07-08 Thread Gabor Grothendieck
To be fair none of Introduction to R, ?plot nor the reference card really cover this without substantial digging. # test data x - 1:10 y - x*x plot(x[x 5], y[x 5]) # or plot(y ~ x, subset = x 5) # We can have combine conditions like this: plot(y ~ x, subset = x 5 y 50) # also if

Re: [R] time series regression

2005-07-08 Thread Gabor Grothendieck
On 7/8/05, yyan liu [EMAIL PROTECTED] wrote: Hi: I have two time series y(t) and x(t). I want to regress Y on X. Because Y is a time series and may have autocorrelation such as AR(p), so it is not efficient to use OLS directly. The model I am trying to fit is like

Re: [R] more and tab functionalities in R under linux

2005-07-08 Thread Gabor Grothendieck
Here are some possibilities: - head(iris) will show the first few rows of the data frame - edit(iris) will put up a spreadsheet with the data frame in it that you can scroll - In JGR (a GUI front end for R) you can use the object browser (ctrl-B) - If the object is a file rather than a data frame

Re: [R] Multiple assignments in one statement

2005-07-08 Thread Gabor Grothendieck
Check out: http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html http://tolstoy.newcastle.edu.au/R/help/04/06/1406.html On 7/8/05, Jeffrey Horner [EMAIL PROTECTED] wrote: Is this possible? For instance, I have a function that returns a vector length 3. In one statement I'd like to assign

Re: [R] merge

2005-07-08 Thread Gabor Grothendieck
trim in package gdata will trim spaces off the beginning and end. On 7/8/05, Ling Jin [EMAIL PROTECTED] wrote: Hi all, I have two data frames to merge by a column containing the site names (as characters). However, somehow, one of the site names of one data frame have fixed length, say 8,

Re: [R] Overlying a Normal Dist in a Barplot

2005-07-08 Thread Gabor Grothendieck
On 7/8/05, Bret Collier [EMAIL PROTECTED] wrote: R-Users, Hopefully someone can shed some light on these questions as I had little luck searching the archives (although I probably missed something in my search due to the search phrase). I estimated multinomial probabilities for some count

Re: [R] Overlying a Normal Dist in a Barplot

2005-07-08 Thread Gabor Grothendieck
) curve(dnorm(x, 2.84, 1.57), min(xrange), max(xrange), add = TRUE) On 7/8/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/8/05, Bret Collier [EMAIL PROTECTED] wrote: R-Users, Hopefully someone can shed some light on these questions as I had little luck searching the archives (although I

Re: [R] Finite Mixture Models with logistic regression

2005-07-09 Thread Gabor Grothendieck
On 7/9/05, Spencer Graves [EMAIL PROTECTED] wrote: Lindsey's packages are not available for all platforms and so are not available on CRAN. Is it true that all CRAN packages in the main repository are available on all platforms? (There is at least an other-software area:

Re: [R] Help to make a specific matrix

2005-07-09 Thread Gabor Grothendieck
On 7/9/05, Jose Claudio Faria [EMAIL PROTECTED] wrote: Dear R users, The solution is probably simple but I need someone to point me to it. How can I to generate a matrix from a numeric sequence of 1:10 like 'A' or 'B' below: A) || | 1 2 3 4 5 |

Re: [R] Using a string as a filter

2005-07-10 Thread Gabor Grothendieck
On 7/10/05, Yzhar Toren [EMAIL PROTECTED] wrote: Hi , I want to be able to filter out results using a string. I'm running an automated script that reads a list of filters I get from an external source and applys them to my data frame consecutively. For example I want to get :

Re: [R] Help with Mahalanobis

2005-07-10 Thread Gabor Grothendieck
I think you could simplify this by replacing everything after the nObjects = nrow(mds) line with just these two statements. f - function(a,b) mapply(function(a,b) (mds[a,] - mds[b,])%*%InvS%*%(mds[a,] - mds[b,]), a,b) D2 - outer(seq(nObjects), seq(nObjects), f) This also eliminates

Re: [R] Help with Mahalanobis

2005-07-10 Thread Gabor Grothendieck
(nObjects), f) } # # test # D2M3 = D2Mah3(iris[,1:4], iris[,5]) On 7/10/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: I think you could simplify this by replacing everything after the nObjects = nrow(mds) line with just these two statements. f - function(a,b) mapply(function(a,b) (mds

Re: [R] Help with Mahalanobis

2005-07-10 Thread Gabor Grothendieck
(iris[,1:4], iris[,5]) print(D2M2) Gabor Grothendieck wrote: I think you could simplify this by replacing everything after the nObjects = nrow(mds) line with just these two statements. f - function(a,b) mapply(function(a,b) (mds[a,] - mds[b,])%*%InvS%*%(mds[a,] - mds[b,]), a,b

Re: [R] building packages on Windows

2005-07-11 Thread Gabor Grothendieck
On 7/11/05, Duncan Murdoch [EMAIL PROTECTED] wrote: On 7/11/2005 3:21 PM, Sundar Dorai-Raj wrote: Hi, all, I just recently upgraded my computer though I'm using the same OS (XP). But now I'm having difficulty building packages and I cannot seem to solve the problem. I'm using R-2.1.1pat

Re: [R] How to obtain Frequency Tables for Histogram outputs and Frequency Polygons

2005-07-11 Thread Gabor Grothendieck
On 7/12/05, Tan Hui Hui Jenny [EMAIL PROTECTED] wrote: Couple of questions: 1. How can I obtain the frequency tables for a histogram chart? 2. Is there a short cut to obtain the frequency polygons directly without having to generate the frequency table and doing a line plot? res - hist(x)

Re: [R] elegant matrix creation

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Robin Hankin [EMAIL PROTECTED] wrote: Hi I want to write a little function that takes a vector of arbitrary length n and returns a matrix of size n+1 by n+1. I can't easily describe it, but the following function that works for n=3 should convey what I'm trying to do: f -

Re: [R] Installing RSPerl and Statistics::R

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Luc Vereecken [EMAIL PROTECTED] wrote: Hi list, For my research, I started using R as a statistics engine, driven by perl scripts that manage my data and computational jobs. I recently upgraded my cluster to Suse 9.2, and obviously wanted to upgrade R to it's latest version,

Re: [R] using its to import time series data with uneven dates

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Sheri Conner Gausepohl [EMAIL PROTECTED] wrote: Good day: I am trying to use readcsvIts(nwr_data_qc.txt,informat=its.format(%Y%m%d%h%M %Y),header=TRUE,sep=,skip=0,row.names=NULL,as.is=TRUE,dec=.) to read in a file (nwr_data_qc.txt) that looks like this: Time Y

Re: [R] using its to import time series data with uneven dates

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/12/05, Sheri Conner Gausepohl [EMAIL PROTECTED] wrote: Good day: I am trying to use readcsvIts(nwr_data_qc.txt,informat=its.format(%Y%m%d%h%M %Y),header=TRUE,sep=,skip=0,row.names=NULL,as.is=TRUE,dec=.) to read in a file

Re: 答复: [R] fail in addin g library in new version.

2005-07-12 Thread Gabor Grothendieck
- 发件人: Gabor Grothendieck [mailto:[EMAIL PROTECTED] 发送时间: 2005年7月7日 20:57 收件人: Uwe Ligges 抄送: Ivy_Li; r-help@stat.math.ethz.ch 主题: Re: 答复: 答复: [R] fail in adding library in new version. On 7/7/05, Uwe Ligges [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: On 7/7/05, Uwe

Re: [R] How to use the function plot as Matlab?

2005-07-12 Thread Gabor Grothendieck
On 7/12/05, klebyn [EMAIL PROTECTED] wrote: Hello, How to use the function plot to produce graphs as Matlab? example in Matlab: a = [1,2,5,3,6,8,1,7]; b = [1,7,2,9,2,3,4,5]; plot(a,'b') hold plot(b,'r') How to make the same in R-package ? I am trying something thus: a -

Re: 答复: 答复: [R] fail in add ing library in new version.

2005-07-12 Thread Gabor Grothendieck
'D:/PROGRA~1/R/rw2011/library/example' I don't know why it can not find the hhc file. Please tell me which step is wrong. Thank you for helping me! ^_^ -原始邮件- 发件人: Gabor Grothendieck [mailto:[EMAIL PROTECTED] 发送时间: 2005年7月13日 9:32 收件人: Ivy_Li 抄送: Duncan Murdoch; r-help

Re: [R] Is there a working XML parser for the windows R Version 2.0.1

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Soren Wilkening [EMAIL PROTECTED] wrote: Dear all the regular XML package does not work correctly with the R 2.0.1 windows version. Can anybody indicate a suitable alternative ? I need to dynamically read, parse and process a HTML table in R that is available at a certain url.

Re: [R] convert to chron objects

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Young Cho [EMAIL PROTECTED] wrote: Hi, I have a column of a dataframe which has time stamps like: eh$t[1] [1] 06/05/2005 01:15:25 and was wondering how to convert it to chron variable. Thanks a lot. Try this: # test data frame eh containing a factor variable t eh

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
You could use the nlines= argument to scan to read in a portion at a time. On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote: add: I used trn-matrix(scan('train1.dat', sep='|', na.string='.'), nrow=273529, ncol=195) it is done. so it seems that I just have no patience to wait for half

Re: [R] High resolution plots

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Luis Tercero [EMAIL PROTECTED] wrote: Dear R-help community, would any of you have a (preferably simple) example of a presentation-quality .png plot, i.e. one that looks like the .eps plots generated by R? I am working with R 2.0.1 in WindowsXP and am having similar problems

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
[I had some email problems and am sending this again. Sorry if you get it twice.] You could use the nlines= argument to scan to read in a portion at a time. On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote: add: I used trn-matrix(scan('train1.dat', sep='|', na.string='.'),

Re: [R] convert to chron objects

2005-07-13 Thread Gabor Grothendieck
[I had some emails problems so I am sending this again. Sorry if you get it twice.] On 7/13/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/13/05, Young Cho [EMAIL PROTECTED] wrote: Hi, I have a column of a dataframe which has time stamps like: eh$t[1] [1] 06/05/2005

Re: [R] High resolution plots

2005-07-13 Thread Gabor Grothendieck
[I had some email problems so I am sending this again. Sorry if you get this twice.] On 7/13/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/13/05, Luis Tercero [EMAIL PROTECTED] wrote: Dear R-help community, would any of you have a (preferably simple) example

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
by passing around matrix(). Since I could not find data.frame() with nrow or ncol arguments. so i have to use matrix first and then as.data.frame to convert it. is there any other (better) way? weiwei On 7/13/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: You could use the nlines= argument

Re: [R] read.table

2005-07-13 Thread Gabor Grothendieck
to convert it. is there any other (better) way? weiwei On 7/13/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: You could use the nlines= argument to scan to read in a portion at a time. On 7/13/05, Weiwei Shi [EMAIL PROTECTED] wrote: add: I used trn-matrix

Re: [R] Where's iris?

2005-07-13 Thread Gabor Grothendieck
On 7/13/05, Ruben Roa [EMAIL PROTECTED] wrote: Hi: Where is the iris data set actually located in the R 2.1.0 folder (under W XP)? Is it a text file or it is a binary file? Ruben Uwe has already explained how to get it in text form; however, if you are curious about its original format in R

Re: [R] convert to chron objects

2005-07-13 Thread Gabor Grothendieck
:25) month.day.year(.Last.value) $month [1] 6 6 $day [1] 5 7 $year [1] 2005 2005 On 7/14/05, Sean O'Riordain [EMAIL PROTECTED] wrote: are those dates in m/d/y or d/m/y ? ?chron and watch out for format = c(dates = d/m/y, times = h:m:s) On 13/07/05, Gabor Grothendieck [EMAIL PROTECTED

Re: [R] plot the number of replicates at the same point

2005-07-14 Thread Gabor Grothendieck
See ?sunflowerplot for a graphic indication of the number of replications at each point. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Calculation of group summaries

2005-07-14 Thread Gabor Grothendieck
1. Try using more spaces so your code is easier to read. 2. Use data.frame to define your data frame (since the method in your post creates data frames of factors rather than the desired classes). 3. Given the appropriate function, f, a single 'by' statement rbind'ed together, as shown, will

Re: [R] Calculation of group summaries

2005-07-14 Thread Gabor Grothendieck
], site_id = x[1,2], visit_no = x[1,3], mean = mean(x[,6]), sd = sd(x[,6]), length = length(x[,6])) do.call(rbind, by(fakesub, fakesub[,1:3], f)) On 7/14/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: 1. Try using more spaces so your code is easier to read. 2. Use data.frame to define

Re: [R] problems with nls function

2005-07-14 Thread Gabor Grothendieck
The start list should only contain parameters, not x. Also your function appears to have multiple errors including reference to temp (presumably intended as tmp?) and b(x-m) which presumably should be b*(x-m). On 7/14/05, Yimeng Lu [EMAIL PROTECTED] wrote: Sorry that I specified the x as

Re: [R] Fwd: Re: East Asian language

2005-07-15 Thread Gabor Grothendieck
I am not sure how generally this works but I was able to get it to switch back and forth between two languages within a single R session like this: Sys.getenv(LANGUAGE) LANGUAGE q() # note English prompt; c means continue rather than exiting Save workspace image? [y/n/c]: c

Re: [R] Confidence Intervals for Arbitrary Functions

2005-07-16 Thread Gabor Grothendieck
On 7/16/05, Jeff Newmiller [EMAIL PROTECTED] wrote: I have a rather basic background in statistics, and am looking for assistance in solving what I expect is a common type of problem. I have measurements of physical processes, and mathematical models of those processes that I want to feed

Re: [R] Where to learn how to deal with time class variable?

2005-07-17 Thread Gabor Grothendieck
On 7/17/05, Kerry Bush [EMAIL PROTECTED] wrote: Dear R-helpers, In my data set, I have a time variable 'RecordTime' whose class property is 'times'. When I list my data set, I see the values of RecordTime is like 10:20:30 in a 'h:m:s' format. Suppose I want to choose all the data after 10

Re: [R] indexing from 0

2005-07-17 Thread Gabor Grothendieck
On 7/17/05, Rashmi Mathur [EMAIL PROTECTED] wrote: Hello, How would one index vectors and matrices starting from 0 (or some other value other than the default of 1) in R? Check out the Oarray package and also the list archives where threads on Oarray mention other approaches as well.

Re: [R] using argument names (of indeterminate number) within a function

2005-07-19 Thread Gabor Grothendieck
On 7/19/05, Dirk Enzmann [EMAIL PROTECTED] wrote: Although I tried to find an answer in the manuals and archives, I cannot solve this (please excuse that my English and/or R programming skills are not good enough to state my problem more clearly): I want to write a function with an

Re: [R] Problems with date-format (R 2.1.1 + chron)

2005-07-19 Thread Gabor Grothendieck
I think its likely that you are using different versions of chron. I noticed that version 2.2-33 of chron had the statement: tms - dts - trunc(dts) but version 2.2-35 seems to have replaced it with: tms - dts - floor(dts) and that seems to be causing the problem. As a workaround:

Re: [R] nls

2005-07-19 Thread Gabor Grothendieck
On 7/19/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear R-helpers, I am trying to estimate a model that I am proposing, which consists of putting an extra hidden layer in the Markov switching models. In the simplest case the S(t) - Markov states - and w(t) - the extra hidden variables -

Re: [R] Problems with date-format (R 2.1.1 + chron)

2005-07-19 Thread Gabor Grothendieck
On 7/19/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: I think its likely that you are using different versions of chron. I noticed that version 2.2-33 of chron had the statement: tms - dts - trunc(dts) but version 2.2-35 seems to have replaced it with: tms - dts - floor(dts

Re: [R] Problems with date-format (R 2.1.1 + chron)

2005-07-20 Thread Gabor Grothendieck
in the references. R News 4/1 Help Desk has some examples of date manipulations in Date, chron and POSIXct in the table at the end of the article. On 7/19/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/19/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: I think its likely that you

[R] R function to kill a process

2005-07-20 Thread Gabor Grothendieck
Is there an R function to kill a process? I found one in package fork but it is specific to UNIX and I want something that also works on Windows. The XP console command, taskkill, will do it so I can easily get the effect but it won't work on other Windows systems, even 2000 and NT. I found a

Re: [R] Is it possible to create highly customized report in *.xls format by using R/S+?

2005-07-20 Thread Gabor Grothendieck
Here is an example where R is the client and Excel is the server so that R is issuing commands to Excel. This example uses the RDCOMClient package from www.omegahat.org: library(RDCOMClient) xl - COMCreate(Excel.Application) # starts up Excel xl[[Visible]] - TRUE

Re: [R] poisson fit for histogram

2005-07-20 Thread Gabor Grothendieck
See ?goodfit in package vcd. On 7/20/05, Thomas Isenbarger [EMAIL PROTECTED] wrote: I haven't been an R lister for a bit, but I hope to enlist someone's help here. I think this is a simple question, so I hope the answer is not much trouble. Can you please respond directly to this email

Re: [R] Issues with convolve

2005-07-20 Thread Gabor Grothendieck
Check out sum.exact in the caTools package. On 7/20/05, Vincent Goulet [EMAIL PROTECTED] wrote: We obtained some disturbing results from convolve() (inaccuracies and negative probabilities). We'll try to make the context clear in as few lines as possible... Our function panjer() (code

Re: [R] The steps of building library in R 2.1.1

2005-07-21 Thread Gabor Grothendieck
R expert, I have built my R library successfully. Especially thanks: Duncan Murdoch Gabor Grothendieck Henrik Bengtsson Uwe Ligges You are welcome. The following is intended for the records in the archive in order to protect

Re: [R] The steps of building library in R 2.1.1

2005-07-21 Thread Gabor Grothendieck
An article like that would be really great. On 7/21/05, Uwe Ligges [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: I think you have been using R too long. Something like this is very much needed. There are two problems: 1. the process itself is too complex (need to get rid

Re: [R] The steps of building library in R 2.1.1

2005-07-21 Thread Gabor Grothendieck
On 7/21/05, Duncan Murdoch [EMAIL PROTECTED] wrote: On 7/21/2005 9:43 AM, Gabor Grothendieck wrote: I think you have been using R too long. Something like this is very much needed. There are two problems: 1. the process itself is too complex (need to get rid of perl, integrate

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-21 Thread Gabor Grothendieck
Use bquote instead of expression, e.g. trees.lm - lm(Volume ~ Girth, trees) trees.sm - summary(trees.lm) trees.co - round(trees.sm$coefficients,2) trees.rsq - round(trees.sm$r.squared,2) plot(Volume ~ Girth, trees) text(10,60, bquote(Intercept : .(trees.co[1,1])%+-%.(trees.co[1,2])), pos = 4)

Re: [R] The steps of building library in R 2.1.1

2005-07-21 Thread Gabor Grothendieck
On 22 Jul 2005 00:01:18 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Duncan Murdoch [EMAIL PROTECTED] writes: On 7/21/2005 9:43 AM, Gabor Grothendieck wrote: I think you have been using R too long. Something like this is very much needed. There are two problems: 1. the process

Re: [R] Question regarding subsetting

2005-07-22 Thread Gabor Grothendieck
There have already been some good solutions but here are three others just to see a range of approaches: sub(^[^-]*-, , A) # remove everything up to first minus sub(Prefix-, , A) # simplified version if prefix known substring(A, 8) # simplification if prefix always 7 chars including minus On

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Gabor Grothendieck
Try as.expression(bquote(...whatever...)) On 7/22/05, Dan Bolser [EMAIL PROTECTED] wrote: On Thu, 21 Jul 2005, Marc Schwartz (via MN) wrote: [Note: the initial posts have been re-arranged to attempt to maintain the flow from top to bottom] Dan Bolser writes: I would like to

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Gabor Grothendieck
On 7/22/05, Dan Bolser [EMAIL PROTECTED] wrote: On Fri, 22 Jul 2005, Gabor Grothendieck wrote: Try as.expression(bquote(...whatever...)) Sob, wimper, etc. my.slope.1 - 3.22 my.slope.2 - 0.13 my.inter.1 - -10.66 my.inter.2 - 1.96 my.Rsqua.1 - 0.97 text(2,5, paste

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Gabor Grothendieck
On 7/22/05, Thomas Lumley [EMAIL PROTECTED] wrote: On Fri, 22 Jul 2005, Dan Bolser wrote: On Fri, 22 Jul 2005, Gabor Grothendieck wrote: Try as.expression(bquote(...whatever...)) Sob, wimper, etc. a-7 plot(1) legend(topleft,legend=do.call(expression

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Gabor Grothendieck
- list( Intercept:, bquote(.(my.inter.1)%+-%.(my.inter.2)), Slope:, bquote(.(my.slope.1)%+-%.(my.slope.2)) ) text(2, c(4,4,4.25,4.25), sapply(L, as.expression), pos = c(2,4,2,4)) On 7/22/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/22/05, Thomas Lumley [EMAIL PROTECTED] wrote: On Fri

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Gabor Grothendieck
2005, Gabor Grothendieck wrote: I think legend accepts a list argument directly so that could be simplified to just: a-7 plot(1) L - list(bquote(alpha==.(a)),bquote(alpha^2+1==.(a^2+1))) legend(topleft,legend=L) Except that it wouldn't then work: the mathematical stuff comes

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-22 Thread Gabor Grothendieck
If one modifies legend by adding a vfont=c(serif, plain) argument to the call to text (which is within the function text2 that is defined within legend) then one can do this: my.slope.1 -3.22 my.slope.2 - 0.13 my.inter.1 - -10.66 my.inter.2 - 1.96 my.Rsqua -0.97 plot(1:5) tt -

Re: [R] Question about 'text' (add lm summary to a plot)

2005-07-23 Thread Gabor Grothendieck
=' dosn't work. Setting this to anything (including the default) seems to surpress the legend without error. But hey! Thanks again, HTH, Marc Schwartz On Fri, 2005-07-22 at 14:01 -0400, Gabor Grothendieck wrote: You are right. One would have to use do.call as you did

Re: [R] Multiple series plot with different 'type' argument

2005-07-24 Thread Gabor Grothendieck
the same time range and have the same frequency. With RSiteSearch(multiple series plot) i found this post by Gabor Grothendieck: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/42281.html Exactly what i need except for one detail. I want one series to be made of points and the other by a line

Re: [R] problem building R packages in windows xp

2005-07-24 Thread Gabor Grothendieck
hhc.exe is the Microsoft help compiler. You have to download that and then put hhc.exe somewhere in your path. The Windows console command path will give you the pathnames in your current path, any of which you could put it in. On 7/24/05, Jordi [EMAIL PROTECTED] wrote: Dear R users,

Re: [R] problem building R packages in windows xp

2005-07-24 Thread Gabor Grothendieck
On 7/24/05, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Sun, 24 Jul 2005, Jordi wrote: I am having problems building R packages in Windows xp. I have followed the instructions from Peter E. Rossi in Documentation - Other, except for the Better to follow the accurate official

Re: [R] Autoregressive Distributed Lag Models

2005-07-25 Thread Gabor Grothendieck
Check out: ?arima Also: http://cran.r-project.org/doc/contrib/Ricci-refcard-ts.pdf http://cran.r-project.org/src/contrib/Views/ Depending on what you need the dyn package, not mentioned in the above, may also be useful. On 7/25/05, Paolo Bulla [EMAIL PROTECTED] wrote: Hallo to everyone,

Re: [R] Don't understand plotmath behaviour (bug?)

2005-07-29 Thread Gabor Grothendieck
Numbers, not in characters strings do not come out bold: plot(1:5, type = n) text(x=3,y=3, quote(bold(paste(a==a ~~ 0.5 == 0.5 On 7/25/05, Wladimir Eremeev [EMAIL PROTECTED] wrote: Dear Thomas, TL In case 1 you have the string 0.5, in case 2 you have the number 0.5. TLtext(x=2,y=2,

Re: [R] Don't understand plotmath behaviour (bug?)

2005-07-30 Thread Gabor Grothendieck
On 30 Jul 2005 09:16:26 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote: Gabor Grothendieck [EMAIL PROTECTED] writes: Numbers, not in characters strings do not come out bold: plot(1:5, type = n) text(x=3,y=3, quote(bold(paste(a==a ~~ 0.5 == 0.5 (what's the paste() for?) I had

Re: [R] How to hiding code for a package

2005-07-30 Thread Gabor Grothendieck
You could set the source attribute like this: R f - function(x) x+1 R # displays the word hidden instead of showing the source R attr(f, source) - hidden R f hidden R f(10) # still works as a function properly [1] 11 Of course, someone knowledgable could change the source attribute back but

Re: [R] Wild card characters

2005-07-30 Thread Gabor Grothendieck
Another way to do it is: sub([.].*, .41, x) This says to replace the first dot and everything after by .41. When . appears in a character class, i.e. [.], then you don't need backslashes. Also you don't need backslashes in the second argument. On 7/30/05, Uwe Ligges [EMAIL PROTECTED]

Re: [R] Premature termination of script

2005-07-30 Thread Gabor Grothendieck
On 7/30/05, Marco Blanchette [EMAIL PROTECTED] wrote: I am fairly new to R and I am writing a script that would take a file, as an input, and generates a bunch of graphs out of it. My first task is to be sure that the file is of the right type by looking if there is a valid barcode in it as in

Re: [R] Drawing a graph with vertices and edges using tcl/tk

2005-07-31 Thread Gabor Grothendieck
Another approach is the Bell Labs graphviz system. See http://www.graphviz.com For an example of using it from R, see the dot.proto function in the 'proto' package. dot.proto generates dot language output to draw a graphviz graph of the objects in any R program written using 'proto'.

Re: [R] farimaSim

2005-07-31 Thread Gabor Grothendieck
Note that if the only difference is the addition of ... to the formal arguments then you can just do this once in your session before using farimaSim: formals(farimaSim) - c(formals(farimaSim), alist(... = )) Now farimaSim will have ... as an argument. e.g. formals(farimaSim) -

Re: [R] NA when using read.csv

2005-08-01 Thread Gabor Grothendieck
On 8/1/05, Haibo Huang [EMAIL PROTECTED] wrote: Hi, when I used: Dist=read.csv(test.csv,header=TRUE) to read data from CSV file. For some cells, R mistakenly put in as NA, while most of the cells still Its not likely that there are errors in this software so its probably not a mistake but

Re: [R] Can R do regression with absolute error loss?

2005-08-01 Thread Gabor Grothendieck
Check out the quantreg package. On 8/1/05, Chunyu Yang {msbbb062} [EMAIL PROTECTED] wrote: Dear R users, I wonder if there are some functions or packages in R that can perform regression under absolute error loss. I have searched the full manual of R, but can not find it. I really

Re: [R] cut.Date functionality for chron date/time objects

2005-08-02 Thread Gabor Grothendieck
Assuming, as in your post: set.seed(123) mychron - chron(sort(runif(10, 0, 10))) breaks - quantile(mychron) # is one of these adequate? cut(mychron, breaks) cut(unclass(mychron), unclass(breaks), lab = FALSE) On 8/2/05, Sebastian Luque [EMAIL PROTECTED] wrote: Hello, I've encountered

Re: [R] regexpr and portability issue

2005-08-02 Thread Gabor Grothendieck
Try this. The regular expression says to match - anything - followed by a double underscore - followed by one or more digits - followed by an underscore - followed by anything. The digits have been parenthesized so that they can be referred to in the backreference \\1.Also use the R

Re: [R] passing variable to formula environment

2005-08-03 Thread Gabor Grothendieck
Note that we can omit the second argument to substitute as in this case since they will be given by the default. On 8/3/05, Sundar Dorai-Raj [EMAIL PROTECTED] wrote: Eric Archer wrote: List gurus, I'm trying to code a Gompertz growth curve function as part of a larger project and

Re: [R] optim

2005-08-04 Thread Gabor Grothendieck
Check out: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/18289.html On 8/4/05, nwew [EMAIL PROTECTED] wrote: Dear R-helpers, The function optim implements algorithms that I would like to use. I have function implemented in R, which given the parameters of which minimization is to

Re: [R] An small suggestion for the R team

2005-08-04 Thread Gabor Grothendieck
On 8/4/05, Jose Claudio Faria [EMAIL PROTECTED] wrote: Hi all, I would like to suggest that all R functions/etc like: codes-deprecated grid-internal ns-alt ns-dblcolon ns-hooks ns-internals ns-lowlev ns-reflect.Rd tools-internal ts-defunct utils-deprecated

Re: [R] An small suggestion for the R team

2005-08-04 Thread Gabor Grothendieck
On 8/4/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 8/4/05, Jose Claudio Faria [EMAIL PROTECTED] wrote: Hi all, I would like to suggest that all R functions/etc like: codes-deprecated grid-internal ns-alt ns-dblcolon ns-hooks ns-internals ns-lowlev ns

Re: [R] Avoiding for loop

2005-08-04 Thread Gabor Grothendieck
On 8/4/05, Matt Crawford [EMAIL PROTECTED] wrote: I understand that in R, for loops are not used as often as other languages, and am trying to learn how to avoid them. I am wondering if there is a more efficient way to write a certain piece of code, which right now I can only envision as a

Re: [R] High resolution plots

2005-08-05 Thread Gabor Grothendieck
On 8/5/05, Knut Krueger [EMAIL PROTECTED] wrote: Gabor Grothendieck schrieb: On 7/13/05, Luis Tercero [EMAIL PROTECTED] wrote: Dear R-help community, would any of you have a (preferably simple) example of a presentation-quality .png plot, i.e. one that looks like the .eps plots

Re: [R] High resolution plots

2005-08-05 Thread Gabor Grothendieck
On 8/5/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 8/5/05, Knut Krueger [EMAIL PROTECTED] wrote: Gabor Grothendieck schrieb: On 7/13/05, Luis Tercero [EMAIL PROTECTED] wrote: Dear R-help community, would any of you have a (preferably simple) example

Re: [R] R: cbind

2005-08-08 Thread Gabor Grothendieck
On 8/8/05, Clark Allan [EMAIL PROTECTED] wrote: hi all are we able to combine column vectors of different lengths such that the result appears in matrix form? e.g. a=1 b=1:3 d=1:4 then z=CBIND(a,b,d) 1 1 1 2 2 3 3 4 i stil want the following! z[,1]=1

Re: [R] R: cbind

2005-08-08 Thread Gabor Grothendieck
On 8/8/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 8/8/05, Clark Allan [EMAIL PROTECTED] wrote: hi all are we able to combine column vectors of different lengths such that the result appears in matrix form? e.g. a=1 b=1:3 d=1:4 then z=CBIND(a,b,d) 1 1 1

Re: [R] help on regression by subsets in dataset

2005-08-08 Thread Gabor Grothendieck
On 8/8/05, Krishna [EMAIL PROTECTED] wrote: Hi Everyone May I request for a small help while performing the regression analysis. I would like to know is there any possibility of conducting the regression for different data subsets (in the same data file), classified on the basis of

Re: [R] coefficient of polynomial expansion

2005-08-08 Thread Gabor Grothendieck
On 8/8/05, Peter Yang [EMAIL PROTECTED] wrote: Hi, I would like to get the coefficient of polynomial expansion. For example, (1+ x)^2 = 1 + 2x + x^2, and the coefficients are 1, 2 and 1. (1 + x + x^2)^3 = 1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6, and the coefficients are 1, 3, 6, 7,

Re: [R] date format

2005-08-10 Thread Gabor Grothendieck
Small point but since: - the paste function will convert its arguments to character - as.Date will give you the format requested anyways - minus is the logical separator here we could modify that to: as.Date(paste(d, 15, sep = -)) On 8/10/05, bogdan romocea [EMAIL PROTECTED] wrote:

Re: [R] Question about curve fitting...

2005-08-10 Thread Gabor Grothendieck
Note that even if you decide that this distinction is applicable, you may still wish to run a linear model prior to nls to get the starting values. On 8/10/05, Dimitris Rizopoulos [EMAIL PROTECTED] wrote: I think here it's important to consider how the errors term come into the model. If y =

Re: [R] repeated - R package

2005-08-10 Thread Gabor Grothendieck
On 8/10/05, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 10 Aug 2005 [EMAIL PROTECTED] wrote: Thompson's Manual to Accompany Agresti's book refers to a package named repeated. It's not on CRAN from what I can see. I have seen rpm's for it. Where is the best place to download this

Re: [R] How to insert a certain model in SVM regarding to fixed kernels

2005-08-12 Thread Gabor Grothendieck
David, Please correct me if I am wrong but I think svm partially works with dyn although I don't remember what the specific limitations were. Its possible that what works already is enough for Amir. For example, library(e1071) library(dyn) set.seed(1) y - ts(rnorm(100)) y.svm - dyn$svm(y ~

  1   2   3   4   5   6   7   8   9   10   >