[R] can rows of text be repeated using R to create a new datafile

2006-07-08 Thread Bob Green
I am hoping for some advice as to whether the following task can be performed in R? I have a spreadsheet with 325 rows x 3 columns. The data was collected from 40 individuals who in most instances generated 8 bi-polar constructs (the poles are separated by //). The first column is the

Re: [R] can rows of text be repeated using R to create a new datafile

2006-07-08 Thread Gabor Grothendieck
Open Excel, select the data and press ctrl-C. In R, type this line at the console to read the clipboard into a data frame DF (or see the section on Excel in the R Import/Export manual for other ways): DF - read.delim(clipboard, header = TRUE) Now you can do this: DF[rep(1:nrow(DF), each =

Re: [R] parametric proportional hazard regression

2006-07-08 Thread Valentin Dimitrov
--- Frank E Harrell Jr [EMAIL PROTECTED] wrote: That will be a very strange model that I've never seen used before in survival analysis. Interpretation of parameters other than the hazard ratio may be tricky. Why do you need a nontraditional model such as this? Frank -- Frank

Re: [R] parametric proportional hazard regression

2006-07-08 Thread Gabor Grothendieck
There is some generalized F code (which would include many other parameteric survival models as submodels) at this page. The R package seems somewhat non-standard in terms of installation and I have not tried it: http://www.math.mun.ca/~ypeng/research/ On 7/8/06, Valentin Dimitrov [EMAIL

[R] Availability of quadplot3d package (UseR!2006 Four Dimensional Barycentric Plots in 3D)

2006-07-08 Thread Carlos Ortega
Dear List, I have been unable fo find the package quadplot3d referred in the Abstract/Presentation Four Dimensional Barycentric Plot in 3D presented in the UserR!2006. Does anyone know if it is available ? And if so, if it is ported to Windows ? Thanks in anticipation, Carlos Ortega

[R] survfit, unused argument(s) (error ...)

2006-07-08 Thread Søren Merser
Hi It seems that survfit() doesn't accept the argumnet 'error' as below survfit(fit, error='greenwood') Error in survfit.coxph(fit, error = greenwood) : unused argument(s) (error ...) Isn't is allowed to do that for a coxph object? Regards Soren Windows XP, SP2 R 2.3.0

Re: [R] KhmaladzeTest

2006-07-08 Thread roger koenker
Questions about packages should be directed to the package maintainers. A more concise example of the difficulty, with accessible data would also be helpful. url:www.econ.uiuc.edu/~rogerRoger Koenker email [EMAIL PROTECTED] Department of Economics

[R] Non-Numeric Histograms

2006-07-08 Thread justin rapp
I have a dataset with a variable that is non-numeric. I was wondering if there is an easy way in R to create a bar graph that will tell me how many of each level of this non-numeric variable are in the overall dataset. Specifically, if my variable is LETTER, and I have A, B,C, D, E, F and I want

Re: [R] Non-Numeric Histograms

2006-07-08 Thread Uwe Ligges
justin rapp wrote: I have a dataset with a variable that is non-numeric. I was wondering if there is an easy way in R to create a bar graph that will tell me how many of each level of this non-numeric variable are in the overall dataset. Specifically, if my variable is LETTER, and I have

Re: [R] Availability of quadplot3d package (UseR!2006 Four Dimensional Barycentric Plots in 3D)

2006-07-08 Thread Uwe Ligges
Carlos Ortega wrote: Dear List, I have been unable fo find the package quadplot3d referred in the Abstract/Presentation Four Dimensional Barycentric Plot in 3D presented in the UserR!2006. Does anyone know if it is available ? And if so, if it is ported to Windows ? I think we should

[R] which model (GLMs)is the best?

2006-07-08 Thread zhijie zhang
Dear friends, I used R to analyze my data with the models of generalized linear models, and found three models were relatively good, but i can't decide which is the best,how should i do ? *Model1:* glm(formula = snail ~ grass + gheight + humidity + altitude + soiltem + airtem + grass:altitude,

[R] another tcl/tk query

2006-07-08 Thread Charles Annis, P.E.
Greetings: I wish to use a tcl/tk widget to ask for user-selected parameter values. My widget works – it asks for and returns to my workspace the stuff I need. Here is a snippet of my code: ### OnOK - function() { LOG.X -

Re: [R] Fwd: time series patterns

2006-07-08 Thread Spencer Graves
For my previous email on this thread, I couldn't find Jim Lindsey's home page. I just found it via www.r-project.org - Search - R Site Search - Jim Lindsey's packages. This led me to http://popgen.unimaas.nl/~jlindsey/rcode.html;. ... just in case someone following this

[R] SUMMARY: R crash with ''library(Matrix); as(x, dgCMatrix)' [was: Warning while subsetting...]

2006-07-08 Thread Thaden, John J
With thanks to Matrix package co-author Martin Maechler, I'm happy to report satisfactory closure of two recent threads I initiated about that package: - Warning while subsetting with Matrix - R Crash with 'library(Matrix);as(x,dgCMatrix) In the first, I reported seeing a warning

[R] Adding Lines to Plot

2006-07-08 Thread justin rapp
This seems like a question that I should be able to answer on my own but after looking at the documentation I cannot seem to find the correct method. How do I add lines to a bar plot that extend from the vertical axis? For example, my vertical axis is numbered in increments of 10 and I would like

Re: [R] PLS method

2006-07-08 Thread Spencer Graves
I believe that regression coefficients can change signs in partial least squares (pls) or in the related structural equation modeling (sem) for roughly the same reasons they can change sign in ordinary least squares (ols). Both PLS and SEM essentially assume that the 'independent'

[R] Summary Statistics for data.frame

2006-07-08 Thread justin rapp
I apologize for my constant questions but I am new to R and trying to gain an appreciation for its capabilities. The following task is easy in Excel and I was hoping somebody could give me a quick explanation for how it can be acheived in R so I can avoid having to switch between the two

Re: [R] Summary Statistics for data.frame

2006-07-08 Thread Duncan Murdoch
On 7/8/2006 3:44 PM, justin rapp wrote: I apologize for my constant questions but I am new to R and trying to gain an appreciation for its capabilities. The following task is easy in Excel and I was hoping somebody could give me a quick explanation for how it can be acheived in R so I can

Re: [R] Summary Statistics for data.frame

2006-07-08 Thread justin rapp
When I attempt to use the mysummary function, I obtain the following error: Error in var(x) : missing observations in cov/cor When I use: by(data.logistic,data.logistic$Ydrafted,summary) I receive no errors. I cut and pasted your mysummary function directly into my r console. Should I have

Re: [R] Summary Statistics for data.frame

2006-07-08 Thread Duncan Murdoch
On 7/8/2006 4:55 PM, justin rapp wrote: When I attempt to use the mysummary function, I obtain the following error: Error in var(x) : missing observations in cov/cor var() gives that error if it sees NA values. You can get it to remove them by using var(x, na.rm = TRUE) instead of var(x).

[R] String mathematical function to R-function

2006-07-08 Thread Cleber N.Borges
hello I make a subroutine that give-me a (mathematical) function in string format. I would like transform this string into function ( R function ). thanks for any tips. cleber #e.g. fun_String = -100*x1 + 0*x2 + 100*x3 fun - function(x1,x2,x3){ return( evaluation( fun_String )

Re: [R] String mathematical function to R-function

2006-07-08 Thread Renaud Lancelot
fun_String - -100*x1 + 0*x2 + 100*x3 fun - function(x1, x2, x3){ + eval(parse(text = fun_String)) + } fun(4:0, -2:2, 0:4) [1] -400 -2000 200 400 Best, Renaud 2006/7/8, Cleber N.Borges [EMAIL PROTECTED]: hello I make a subroutine that give-me a (mathematical) function in

[R] Combining a list of similar dataframes into a single dataframe

2006-07-08 Thread Mike Nielsen
I would be very grateful to anyone who could point to the error of my ways in the following. I have a dataframe called net1, as such: str(net1) `data.frame':114192 obs. of 9 variables: $ server : Factor w/ 122 levels AB93-99,AMP93-1,..: 1 1 1 1 1 1 1 1 1 1 ... $ ts

[R] denominator degrees of freedom and F-values in nlme

2006-07-08 Thread M R Robinson
Hello, I am struggling to understand how denominator degrees of freedom and subsequent significance testing based upon them works in nlme models. I have a data set of 736 measurements (weight), taken within 3 different age groups, on 497 individuals who fall into two morphological catagories

Re: [R] Combining a list of similar dataframes into a single dataframe

2006-07-08 Thread Mike Nielsen
Well, this worked, and rather more quickly than I had expected. Many thanks to the dogs, who told me the answer in return for walking them and feeding them! jj - eval(parse(text=paste(sep= ,rbind(,paste(sep= ,t1[[,1:length(t1),]],collapse=,), str(jj) `data.frame': 85644 obs. of 4

Re: [R] Adding Lines to Plot

2006-07-08 Thread markleeds
From: justin rapp [EMAIL PROTECTED] Date: Sat Jul 08 14:05:12 CDT 2006 To: r-help@stat.math.ethz.ch Subject: [R] Adding Lines to Plot i'm not definite on this and even if it works , it;s not the most efficient but abline(h=10) abline(h=20) abline(h=30) etc i'd be curious if that works on a bar

Re: [R] Combining a list of similar dataframes into a single data frame [Broadcast]

2006-07-08 Thread Liaw, Andy
A couple of suggestions: 1. This screams out for do.call. Try jj - do.call(rbind, t1). 2. Use rowSums() instead of apply(..., 1, sum). Andy _ From: [EMAIL PROTECTED] on behalf of Mike Nielsen Sent: Sat 7/8/2006 7:20 PM To: r-help@stat.math.ethz.ch Subject: Re: [R] Combining a list

[R] Hunting for snow...

2006-07-08 Thread Brian Lunergan
Evening folks: I did an install.views of finance and econometrics and between the two of them R reported 'FracSim', 'RDCOMClient', 'snow', 'VGAM', and 'segmented' as missing dependencies. Now, I've managed to hunt down what appear to be current zip file copies of all of the packages but

Re: [R] String mathematical function to R-function

2006-07-08 Thread Liaw, Andy
Here's one long-winded way of going about it, using R's ability to manipulate functions as first class objects: f.string [1] x1 + sqrt(3*x2) p.string - parse(text=f.string) f - function() {}# empty function v - all.vars(p.string) # all the variables in the expression a -

[R] last 2 questions about save and load

2006-07-08 Thread markleeds
i played around and i get the hang of save and load. I just have two final questions : 1) is loading the RandomFields package the only way to check if a file ( created through the save function ) is out there or not ? Because, I generally won't know if one has been created yet or not. 2)

[R] package:Matrix handling of data with identical indices

2006-07-08 Thread Thaden, John J
In the Matrix package v. 0.995-11 I see that the dgTMatrix Class for compressed, sparse, triplet-form matrices handles Identically indexed data instances by summing their values, e.g., library(Matrix) (Mt - new(dgTMatrix, i = as.integer(c(0,0,1,1,4)), j = as.integer(c(0,1,2,2,4)), x =

Re: [R] Non-Numeric Histograms

2006-07-08 Thread Jim Lemon
justin rapp wrote: I have a dataset with a variable that is non-numeric. I was wondering if there is an easy way in R to create a bar graph that will tell me how many of each level of this non-numeric variable are in the overall dataset. Specifically, if my variable is LETTER, and I have

Re: [R] dotplot (lattice) with panel.segments and groups

2006-07-08 Thread Sebastian Luque
Gabor Grothendieck [EMAIL PROTECTED] wrote: On 7/7/06, Deepayan Sarkar [EMAIL PROTECTED] wrote: On 7/7/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Could you explain what panel.groups= does and what the difference is between panel.groups= and panel= ? In ?xyplot it just says: