Re: [R] Using R for large econometric models

2007-11-07 Thread Pfaff, Bernhard Dr.
Dear Dietrich, in the first place, it would have been helpful to know which kind of econometric models your colleague wants to utilise. With respect to econometric methods you might want to have a look at the CRAN Task Views for econometrics and finance, to see what is already available:

Re: [R] Is it possible to modify the position of the graphic window ?

2007-11-07 Thread Martin Maechler
RT == Rolf Turner [EMAIL PROTECTED] on Wed, 7 Nov 2007 09:57:12 +1300 writes: RT On 7/11/2007, at 9:12 AM, Prof Brian Ripley wrote: 1) Did you merge the resources or restart X? You need to in order to get new resources to be recognized. xrdb -merge ~/.Xresources

Re: [R] Is it possible to modify the position of the graphic window ?

2007-11-07 Thread 8rino-Luca Pantani
I would like to improve my knowledge on the matter, but I cannot find url in your posts. Did I miss something ? Or you mean that you have added the url in the help page ? Thanks 8rino Prof Brian Ripley ha scritto: I added an example (and a reference url) to ?X11 yesterday, since it seems

[R] strwidth and strheight for rotated text

2007-11-07 Thread Stéphane Dray
Dear All, I would like to plot text with a box around it. I used strwidth and strheight to compute the size of the box which is plotted with rect: z - rnorm(10) # horizontal text works plot(rnorm(10)) x1 - 5 y1 - 0 label - Label cha - paste( , label, , sep = ) xh - strwidth(cha, cex =

Re: [R] strwidth and strheight for rotated text

2007-11-07 Thread Prof Brian Ripley
See ?par, 'cxy' for how to go from width/heights in inches to user coordinates and vice versa. You appear to have overlooked 'pin'. On Wed, 7 Nov 2007, Stéphane Dray wrote: Dear All, I would like to plot text with a box around it. I used strwidth and strheight to compute the size of the box

Re: [R] strwidth and strheight for rotated text

2007-11-07 Thread Stéphane Dray
Thanks a lot Brian, you were completely correct. The good way to do it : z - rnorm(10) x1 - 5 y1 - 0 label - Label cha - paste( , label, , sep = ) X11(height=4) plot(z) xusr - par(usr) xh - strwidth(cha, cex = par(cex)) yh - strheight(cha, cex = par(cex)) * 5/3 tmp - xh xh -

[R] PVM error message

2007-11-07 Thread Lenzo, Antonino
Hello R enthusiasts, I am working with a Fedora Core 6 OS and R 2.5. I have just finished loading PVM on my test cluster and this is working properly. Also, rpvm has been loaded in R. However, when I try to load my test program, I receive this error: Loading required package: rpvm Error in

Re: [R] Imputing missing values in time series

2007-11-07 Thread Joao Santos
Hello, I have a similar problem but in my case I have a seasonal time series and the gaps are bigger. Like I said the TS as a seasonality to the week and some gaps are so big that seasonality is broken. I need a process to predict this values and keep the seasonality. From the search that I

[R] Trouble in creating a list

2007-11-07 Thread Gang Chen
I want to create a list based on the information from a data.frame, Model. So I tried the following: MyList - list(colnames(Model)[2] = levels(Model$(colnames(Model)[2]))) but it failed with an error: Error: unexpected '=' in list(colnames(Model)[2] = I have the following problems with this

Re: [R] partially sum variable of a dataframe

2007-11-07 Thread Julian Burgos
I'm assuming that you want to add b if 3a5.25. If so, there are many ways. One of them is sum (b[a3 a5.25]) This is very simple R coding. I recommend you spend some time learning the basics. There are very good tutorials at the R website. Julian [EMAIL PROTECTED] wrote: Hello, A

Re: [R] partially sum variable of a dataframe

2007-11-07 Thread Bert Gunter
Or even simpler (when cc is a data frame), instead of sum(cc[cc[,a] = 5.25 cc[,a] = 3, b]) ## with(cc, sum(b[a = 5.25 a = 3])) Bert Gunter Genentech Nonclinical Statistics __ R-help@r-project.org mailing list

[R] bug in multcomp?

2007-11-07 Thread Robert Cribbie
I am running a linear model with achiev as the outcome and major as my iv (5 levels). The lm statement runs fine, but for the glht command I get the following error. I noted that someone else asked the same question a while back but received no reply. I am hoping someone might know what is

Re: [R] Simple Umacs example help..

2007-11-07 Thread Adam Wilson
Greetings, I've been playing with the umacs package for a few days and have worked out an example of a simple linear regression using gibbs samplers (included below). While extremely basic, I hope this might be helpful. I would love to see more examples of MH sampling as well.

Re: [R] dates

2007-11-07 Thread John Kane
http://finzi.psych.upenn.edu/R/library/base/html/format.Date.html might help as a start. --- marciarr [EMAIL PROTECTED] wrote: Dear R users, I am just starting with R and am currently needing a lot of help! Sorry if I disturb you and thank you for your answers!!! Here goes my question:

[R] mixed model testing

2007-11-07 Thread Irene Mantzouni
Is there a formal way to prove the need of a mixed model, apart from e.g. comparing the intervals estimated by lmList fit? For example, should I compare (with AIC ML?) a model with seperately (unpooled) estimated fixed slopes (i.e.using an index for each group) with a model that treats this

Re: [R] PVM error message

2007-11-07 Thread elw
I am working with a Fedora Core 6 OS and R 2.5. I have just finished I am using PVM3.4.5+6-WIN32.tar.gz Isn't that supposed to be the wad of files for Windows machines? there's a different link on the PVM homepage to the source for unices... --elijah

Re: [R] R as a programming language

2007-11-07 Thread Alexy Khrabrov
On Nov 7, 2007, at 4:13 PM, Duncan Murdoch wrote: And, still no option processing as in GNU long options, or python or ruby's optparse. What's the semantics of parameter passing -- by value or by reference? By value. Thanks Duncan! So if I have a huge table t, and the idea was to

Re: [R] Linear Regression

2007-11-07 Thread Prof Brian Ripley
Doesn't lm(fquamsci ~ ., data=a) work? It normally does for a list a, so there would seem to be something special about your example if it does not. E.g. library(MASS) attach(hills) a - list(dist=dist, climb=climb, time=time) detach() lm(time ~ ., data=a) (Maybe 'a' is not actually a list

Re: [R] color2D.matplot

2007-11-07 Thread Phillip Aldridge
Hi Jim, Thanks for the suggestion I will try it as I do find color2D.matplot is a bit more versatile. I have however, since pasting my message, carried on playing and found out that that doing the following actually works as well: fg = read.table(flagenes.txt, row.names=1)

Re: [R] Trouble in creating a list

2007-11-07 Thread Henrique Dallazuanna
Try this: 1)eval(parse(text=paste(MyList-list(, colnames(Model)[2], =, Model[,colnames(Model)[2]], 2)Model[,colnames(Model)[2]] 3)MyList[[3]] - Teste MyList[[4]] - Teste1 -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 07/11/2007, Gang Chen [EMAIL

[R] Daily announcements of changes (was: Save as postScrips latest R version)

2007-11-07 Thread Duncan Murdoch
It seems people are unaware of the daily announcements of R changes. If a change is significant enough to warrant mention in the NEWS file, it will be announced on one of the lists described here: http://developer.r-project.org/RSSfeeds.html These are available as RSS feeds, as the URL

Re: [R] Algorithms for coincidences

2007-11-07 Thread Doran, Harold
Thank you, Greg. In part, that's what I'm poking around for. I'm wondering if there are any adaptations to clustered situations. I have that paper below since it is the reference in qbirthday(), but haven't found anything that has adapted this further. -Original Message- From: [EMAIL

Re: [R] Shortcut to refer to an attached dataframe?

2007-11-07 Thread Gabor Grothendieck
Here is one possibility: gets - function(pos) get(search()[pos]) attach(iris) summary(gets(2)) Sepal.LengthSepal.Width Petal.LengthPetal.Width Min. :4.300 Min. :2.000 Min. :1.000 Min. :0.100 1st Qu.:5.100 1st Qu.:2.800 1st Qu.:1.600 1st Qu.:0.300 Median

Re: [R] Can I replace NA by 0 (if yes, how) ?

2007-11-07 Thread Wollkind, Steven
You don't need to loop. You can just do pfit$coefficients[is.na(pfit$coefficients)] - 0 Steve Wollkind Associate Analyst Geode Capital Management, LLC 1 Post Office Square / 28th Floor / Boston, MA 02109 [EMAIL PROTECTED] Tel: (617) 392-8991 Fax: (617) 476-6389 This e-mail, and any

Re: [R] Can I replace NA by 0 (if yes, how) ?

2007-11-07 Thread Ptit_Bleu
I found this solution but it must another one much more R-friendly ? for (a in 1:9) { if (is.na(pfit$coefficients[[a]])) (pfit$coefficients[[a]]-0) } Again thank you in advance for explainations concerning NA, Ptit Bleu. -- View this message in context:

Re: [R] Graphics devices: windows() and x11() vs default

2007-11-07 Thread Wollkind, Steven
Ah ha! I wasn't aware of the getOption(device) call before. It appears that as soon as I load the cairoDevice library my default device gets set to Cairo, which explains why the Cairo device behavior matches what I was seeing before. This is now purely a cairo device issue, so I will pursue it

[R] Shortcut to refer to an attached dataframe?

2007-11-07 Thread Jeff Marcus
When I attach data frames I often want to be able to refer to the whole data frame rather then one of its components. For example: attach (my.data.frame) summary(my.data.frame) That's fine but often the frame has a very long name so I'd prefer some shorthand way of referring to it by its

Re: [R] Indexing, and using an empty string as a name

2007-11-07 Thread Prof Brian Ripley
[Adding R-help back, as you did later.] On Wed, 7 Nov 2007, Charilaos Skiadas wrote: On Nov 7, 2007, at 2:51 AM, Prof Brian Ripley wrote: On Tue, 6 Nov 2007, Charilaos Skiadas wrote: Hello all, I ran into the following, to me unexpected, behavior. I have (for reasons that don't

Re: [R] color2D.matplot

2007-11-07 Thread Jim Lemon
wragbag wrote: I am a true R novice aonly using it for this function ;) I am trying to use color2D.matplot to form a image of my data using the following conditions color2D.matplot(fi1, c(dr), c(dg), c(db), nslices=7, ylab='Species', xlab=gene, show.legend=TRUE) where fi1 is my matrix.

Re: [R] vectorize a list

2007-11-07 Thread Henrique Dallazuanna
try this: unlist(l) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 08/11/2007, Frank Schmid [EMAIL PROTECTED] wrote: Dear R user Suppose I have the following list: f - rnorm(2) s - rnorm(3) l - list(f,s) l [[1]] [1] 0.31784399 0.08575421 [[2]] [1]

Re: [R] Kolmogorov-Smirnoff test

2007-11-07 Thread Jasjeet Singh Sekhon
A bootstrap Kolmogorov-Smirnoff test will have the correct test level even if there are ties---i.e., even if non-continuous distributions are being compared. See Abadie, Alberto. 2002. ``Bootstrap Tests for Distributional Treatment Effects in Instrumental Variable Models.'' Journal of the

Re: [R] question about running out of memory on R -- memory.limit change in R 2.6.0?

2007-11-07 Thread kees
Earl, Reported memory sizes work ok on Vista 64. If I ask for 3.5M it will give it, even though I have only 2Mb of RAM. It devaults to 2Mb as expected. Op Tue, 06 Nov 2007 19:38:07 +0100 schreef Earl F. Glynn [EMAIL PROTECTED]: jim holtman [EMAIL PROTECTED] wrote in message news:[EMAIL

[R] partially sum variable of a dataframe

2007-11-07 Thread mdgi
Hello, A stupid question: I have an array with two columns, the first a acting as my index in 0.25 steps, the second one b the column of interest. How can i sum up b only for a specified window in a (as the window command for time series) a=seq(0,10,0.25) b=runif(41) c=data.frame(a,b) Sum up

[R] Graphics devices: windows() and x11() vs default

2007-11-07 Thread Wollkind, Steven
I'm noticing some differences between making an explicit call to windows() to generate a graphics device and going with whatever R gives you when you just start plotting, which raises the question of just what the nature of the default device is. I've had a hard time researching this so far, so

[R] R as a programming language

2007-11-07 Thread Alexy Khrabrov
Greetings -- coming from Python/Ruby perspective, I'm wondering about certain features of R as a programming language. Say I have a huge table t of the form run ord unitwords new 1 1 69391013641 1 2 275 1001518 1 3 33141008

Re: [R] Indexing, and using an empty string as a name

2007-11-07 Thread Charilaos Skiadas
Sorry, I meant to reply to the whole list. I can totally understand the list's policy of not defaulting to reply to the list, but I keep forgetting it in practice (since I am in a couple of other lists with less traffic, where the default is to reply to the list. Haris Skiadas Department

Re: [R] Imputing missing values in time series

2007-11-07 Thread Gabor Grothendieck
Here is na.locf both operating on x and on a zoo variable compared to the others: set.seed(1) x = 1:1e5 x[sample(1:1e5, 1)] = NA system.time(z2-locf.iverson2(x)) user system elapsed 0.050.000.05 system.time(z1-locf.iverson(x)) user system elapsed 0.110.00

Re: [R] vectorize a list

2007-11-07 Thread Thibaut Jombart
Frank Schmid wrote: Dear R user Suppose I have the following list: f - rnorm(2) s - rnorm(3) l - list(f,s) l [[1]] [1] 0.31784399 0.08575421 [[2]] [1] -0.6191679 0.7615479 -1.0087659 Can I stack the entries of this list in 1 vector with the first list entry followed by the second?

Re: [R] Daily announcements of changes (was: Save as postScrips latest R version)

2007-11-07 Thread Camila Estevam
Hi Professor Murdoch Thank you very much for your reply, I really did not know about the daily announcements. Next time I will check them. I will install the R-patched and let you know if it works. Thanks again, Camila --- Duncan Murdoch [EMAIL PROTECTED] escreveu: It seems people are

[R] Aggregate with non-scalar function

2007-11-07 Thread Mike Nielsen
R-Helpers, I'm sorry to have to ask this -- I've not used R very much in the last 8 or 10 months, and I've gotten rusty. I have the following (ff2 is a subset of a much, much larger dataset): ff2 hostName user sys idle obsTime 10142 fred 0.4 0.5 98.0 2007-11-01 02:02:18

[R] Save as postScrips latest R version

2007-11-07 Thread Camila Estevam
Hi, I was using the 2.4.1 R version and I had no problem saving my plots as postScript. Now that I have installed the latest version 2.6.0 I can not save any plot as postScript. When I try the following message appears: Erro: Invalid font type Além disso: Warning messages: 1: font family not

[R] SE of mean using subsampling bootstrap

2007-11-07 Thread Anil
I have been trying to get an example of R statements for estimating SE of mean using Subsampling bootstrap. Could someone help me? Thanks Anil [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] histogramme

2007-11-07 Thread elyakhlifi mustapha
Hello, I can plot histogrammes but I want to know how can I do to plot 2 histogrammes at the same time (in the same window). hist(as.numeric(as.character(B[,1])),col=lightblue, border=pink) hist(as.numeric(as.character(A[,1])),col=yellow, border=pink) thanks.

Re: [R] Aggregate with non-scalar function

2007-11-07 Thread jim holtman
Is this closer to what you would like? x - textConnection( hostName user sys idle date time + 10142 fred 0.4 0.5 98.0 2007-11-01 02:02:18 + 16886 barney 0.5 0.2 94.6 2007-10-25 19:12:12 + 8795 fred 0.0 0.1 99.8 2007-10-30 05:08:22 + 5261 fred 0.1 0.2 99.7

[R] (no subject)

2007-11-07 Thread andrew collier
hello, i am a bit of a statistical neophyte and currently trying to make some sense of confidence intervals for correlation coefficients. i am using the cor.test() function. the documentation is quite terse and i am having trouble tieing up the output from this function with stuff that i have

Re: [R] Trouble in creating a list

2007-11-07 Thread Henrique Dallazuanna
Hi, i think that is more easy MyList - list(levels(Model[,colnames(Model)[2]])) names(MyList) - colnames(Model)[2] On 07/11/2007, Gang Chen [EMAIL PROTECTED] wrote: Hi, I really appreciate your help! As I'm still learning basics in R, please pardon my simple questions. It seems

Re: [R] bug in multcomp?

2007-11-07 Thread Richard M. Heiberger
The only obvious typo is the misspelling of Tukey. Uppercase is necessary. But that is not the cause of the current error. I can't duplicate the problem from your description. Look at the data.frame data_mcp. If that doesn't give you the hint, then you will need to send the data to the list,

Re: [R] [R-sig-ME] mixed model testing

2007-11-07 Thread John Maindonald
Whether or not you need a mixed model, e.g. random versus fixed slopes, depends on how you intend to use results. Suppose you have lines of depression vs lawn roller weight calculated for a number of lawns. If the data will always be used to make predictions for one of those same lawns, a fixed

[R] Adding submenus to existing consol GUI menu

2007-11-07 Thread simon gatehouse
If possible I would like to add two sub-menus to the R Console under Windows. For example, I would like to add: winMenuAddItem(File, Load CSV..., loadCSV()) winMenuAddItem(File, Save CSV..., saveCSV()) and have them appear under the initial 'File' item rather than add a new 'File' menu item. I

[R] Dealing with schema in RODBC

2007-11-07 Thread Mark Lyman
Is there a way to get a table in a certain schema? The Oracle database I am using has a table by the same name in two different schemas. This creates problems in sqlUpdate because to sqlUpdate there are duplicate columns. The following is part of the output of sqlColumns: sqlColumns(eids,

[R] creating a dynamic output vector

2007-11-07 Thread Steve Powers
Let's say I have a program that returns variables whose names may be any string within the vector NAMES=c(varA,varB,varC,varD,varE,varF...varZ), but I do not ever know which ones have actually been created. So in one example output, varA, varC, and varD could exist, but in another example

Re: [R] R as a programming language

2007-11-07 Thread Duncan Murdoch
On 11/7/2007 7:46 AM, Alexy Khrabrov wrote: Greetings -- coming from Python/Ruby perspective, I'm wondering about certain features of R as a programming language. Lots of question, I'll intersperse some answers. Say I have a huge table t of the form run ord unitwords new

Re: [R] Dealing with schema in RODBC

2007-11-07 Thread Marc Schwartz
On Wed, 2007-11-07 at 22:15 +, Mark Lyman wrote: Is there a way to get a table in a certain schema? The Oracle database I am using has a table by the same name in two different schemas. This creates problems in sqlUpdate because to sqlUpdate there are duplicate columns. The following is

[R] running sum of a vector

2007-11-07 Thread Alexy Khrabrov
I need a vector with sums of vectors up to each position in the original. The imperative version is simple: # running sum: the traditional imperative way sumr.1 - function(x) { s - c() ss - 0 for (i in 1:length(x)) { ss - ss + x[i] s[i] - ss } s } Yet I want a

Re: [R] R as a programming language

2007-11-07 Thread Alexy Khrabrov
With all due respect to the great book -- of which I own 2 copies I bought new -- it's not an O'Reilly Programming in X book. The idea of a programming book like that is to thoroughly treat the language from a programmer's standpoint, in a fairly standard way, such as Ruby or Python. As

Re: [R] creating a dynamic output vector

2007-11-07 Thread Peter Alspach
Steve Is this the sort of thing you mean? output - character(26) names(output) - paste('var', LETTERS[1:26], sep='') output output[paste('var', LETTERS[c(2,4,6,7,16)], sep='')] - c(1, pi, letters[1:3]) output Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] running sum of a vector

2007-11-07 Thread Chuck Cleland
Alexy Khrabrov wrote: I need a vector with sums of vectors up to each position in the original. The imperative version is simple: # running sum: the traditional imperative way sumr.1 - function(x) { s - c() ss - 0 for (i in 1:length(x)) { ss - ss + x[i] s[i] - ss

Re: [R] running sum of a vector

2007-11-07 Thread Benilton Carvalho
x - 1:10 cumsum(x) b On Nov 7, 2007, at 5:59 PM, Alexy Khrabrov wrote: I need a vector with sums of vectors up to each position in the original. The imperative version is simple: # running sum: the traditional imperative way sumr.1 - function(x) { s - c() ss - 0 for (i in

Re: [R] R as a programming language

2007-11-07 Thread Duncan Murdoch
On 11/7/2007 8:13 AM, Duncan Murdoch wrote: On 11/7/2007 7:46 AM, Alexy Khrabrov wrote: Greetings -- coming from Python/Ruby perspective, I'm wondering about certain features of R as a programming language. Lots of question, I'll intersperse some answers. Say I have a huge table t of

Re: [R] vectorize a list

2007-11-07 Thread Moshe Olshansky
Stack does not work for me either, but unlist works, i.e. unlist(l) --- Frank Schmid [EMAIL PROTECTED] wrote: Dear R user Suppose I have the following list: f - rnorm(2) s - rnorm(3) l - list(f,s) l [[1]] [1] 0.31784399 0.08575421 [[2]] [1] -0.6191679 0.7615479

Re: [R] Homework help: t test hypothesis testing with summarized data?

2007-11-07 Thread Peter Dalgaard
Zembower, Kevin wrote: Is this how a t hypothesis test is done when I don't have the actual data, but just the summarized statistics: #Homework 9.2.6 [1] n-31 xbar-3.10 s_x-1.469 m-57 ybar-2.43 s_y-1.35 s_pooled- (((n-1)*s_x^2) + ((m-1)*s_y^2)) / (n + m - 2) s_pooled [1]

[R] analysis of 2x2 tables of various designs

2007-11-07 Thread Max Moldovan
Dear Colleagues, Could you recommend a package of combination of functions in R for analysis of 2x2 tables of various designs. Preferably it should include tests and confidence limits (both exact and approximate) for alternative designs, such as independent proportions (e.g. parallel group

Re: [R] a newbie question about data

2007-11-07 Thread Bill.Venables
The book came out in 2002 and a lot has happened with R in the time since then. In particular it is now possible for R to have 'lazy loading' of objects. If the person setting up the package has used this option (as they all now should), when the package is loaded R essentially is made aware

Re: [R] creating a dynamic output vector

2007-11-07 Thread Ben Bolker
Steve Powers wrote: Not exactly. That doesn't work for me. Because I don't actually know what variables are created each time I run the program, I don't have an easy way to call all the ones I need at once (which your suggestion appears to require). But I do have a list of names for

Re: [R] creating a dynamic output vector

2007-11-07 Thread Rolf Turner
On 8/11/2007, at 3:00 PM, Steve Powers wrote: Everyone is assuming I know what the output data are, or that they come out from my model in some easily called vector. But I don't, and they do not. The outputs are hidden, and all are separate variables that need to be called. Also

Re: [R] Adding submenus to existing consol GUI menu

2007-11-07 Thread Gabor Grothendieck
You could try deleting all the existing menus and then recreating them in the way you want. I believe that once worked although I haven't tried it recently. On Nov 7, 2007 4:14 PM, simon gatehouse [EMAIL PROTECTED] wrote: If possible I would like to add two sub-menus to the R Console under

Re: [R] a newbie question about data

2007-11-07 Thread Prof Brian Ripley
A lot of those changes are of course in the on-line Errata at http://www.stats.ox.ac.uk/pub/MASS4/Errata4.1 . E.g. R Changes = p.12 As from R 1.7.0 data() is not needed for our datasets, but it is needed for R's own datasets ability.cov, iris3 and swiss prior to R 2.0.0.

Re: [R] a newbie question about data

2007-11-07 Thread envisage
thanks for the detailed info. and sorry for the anonymously posting(may be subscripted with another email account, i can't specify which one is, now i subscript r-help mail list with this mail account). On Nov 8, 2007 12:48 PM, [EMAIL PROTECTED] wrote: The book came out in 2002 and a lot has

Re: [R] creating a dynamic output vector

2007-11-07 Thread Bert Gunter
?match I think is what you're after. e.g. x - letters[1:10] y - c(b,f) x[match(x,y)] Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Alspach Sent: Wednesday, November 07, 2007 2:41 PM To: Steve

Re: [R] creating a dynamic output vector

2007-11-07 Thread jim holtman
Here is a script that will find all the atomic objects of length 1 and put them in a dataframe that you then use to determine what variables are there. a - 1 # generate some atomic objects b - 1.3 x.char - character string x.log - TRUE x.real - pi # get all atomic objects of length 1

Re: [R] creating a dynamic output vector

2007-11-07 Thread Steve Powers
Everyone is assuming I know what the output data are, or that they come out from my model in some easily called vector. But I don't, and they do not. The outputs are hidden, and all are separate variables that need to be called. Also which ones come out after a given run will vary each time.

Re: [R] creating a dynamic output vector

2007-11-07 Thread jim holtman
Here is a function that might do what you want: # function to create the output f.output - function(dat){ + # create the base output vector + output.base - rep(NA,10) + names(output.base) - paste(var, 1:10, sep='') + output.base[names(dat)] - dat + output.base + }

Re: [R] Can I replace NA by 0 (if yes, how) ?

2007-11-07 Thread Julian Burgos
Do this: pfit$coefficients[is.na(pfit$coefficients)]=0 Julian Ptit_Bleu wrote: Hello, I'm trying to fit some points with a 8-degrees polynom (result of lm is stored in pfit). In most of the case, it is ok but for some others, some coefficients are NA. I don't really understand the

Re: [R] Mixing lty specifications in legend

2007-11-07 Thread Duncan Murdoch
On 07/11/2007 7:01 PM, Peter Dunn wrote: Hi all I have a plot with lines, one specified as (say) lty=1, using standard line types, and another as (say) my own spec: lty=51. I can't get legend to display both. Toy example: plot(1~1) legend(topright, lty=c(51,1), legend=c(My

[R] a newbie question about data

2007-11-07 Thread envisage
hi, I am reading Modern Applied Statistics with S 4th ed。 page4 have these two lines: library(MASS) data(chem) # needed in R only but I find withou the line data(chem) I can still access chem, isn't it? is it unnecessary or something i missed here? thanks for the replay in advance.

Re: [R] a newbie question about data

2007-11-07 Thread Rolf Turner
On 8/11/2007, at 4:26 PM, envisage wrote: hi, I am reading Modern Applied Statistics with S 4th ed。 page4 have these two lines: library(MASS) data(chem) # needed in R only but I find withou the line data(chem) I can still access chem, isn't it? is it unnecessary or something i missed

Re: [R] a newbie question about data

2007-11-07 Thread envisage
Rolf, thanks for the reply, i see now. On Nov 8, 2007 11:43 AM, Rolf Turner [EMAIL PROTECTED] wrote: On 8/11/2007, at 4:26 PM, envisage wrote: hi, I am reading Modern Applied Statistics with S 4th ed。 page4 have these two lines: library(MASS) data(chem) # needed in R only but I