[R] Need help with nlme code

2010-11-02 Thread Muhammad Yaseen
*Dear All,* * * *I got a very simple for you. Please help me to come up with the R code in nlme for the following SAS code:* * * *{* proc mixed data=spatvar; model yield = ; repeated / subject = intercept type= sp(sph)(row col); parms (0 to 10 by 2.5) (1 to 10

[R] how to compare two datasets in R?

2010-11-02 Thread song song
hi, everybody, my question is: suppose I have two data sets, set A is large and have variables like ID, Gender, Income. Set B is small and suppose only has ID. Now I want to get a subset from data set A which contains ID from Set B. How to do this in R? Is there any commands to do this?

Re: [R] how to compare two datasets in R?

2010-11-02 Thread Santosh Srinivas
Take a look at ?merge for doing such join operations. (I believe that should help) If you had provided a sample of your datasets using dput, I would have checked that for you. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of song

Re: [R] Using R for Production - Discussion

2010-11-02 Thread baptiste auguie
Hi, Regarding your '10 commandments' in Q3, you may find useful tips in the R inferno by Pat Burns. HTH, baptiste On 2 November 2010 05:04, Santosh Srinivas santosh.srini...@gmail.com wrote: Hello Group, This is an open-ended question. Quite fascinated by the things I can do and the

[R] how to make multiple curves in one plot

2010-11-02 Thread karena
hello, plot(running(-log10(results_chr_p$empi_p), fun=mean, width=41, font.axis=4, by=1),type=l,cex=0.1, ylab=-Log(p), ylim=c(0,5.0), xlab= , lwd=2) this is my code to make a plot. The problem is, now I want to add one more curve to the plot, which is for another variable in the data.frame

Re: [R] how to compare two datasets in R?

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 2:14 AM, song song wrote: hi, everybody, my question is: suppose I have two data sets, set A is large and have variables like ID, Gender, Income. Set B is small and suppose only has ID. Now I want to get a subset from data set A which contains ID from Set B. Try:

Re: [R] how to make multiple curves in one plot

2010-11-02 Thread Joshua Wiley
Hi Karena, As Remko mentioned, it really is polite to say what package your function is from if its not one of the basics (such as base or stats). Also, it is nice to give us sample data (side note, both of these things are mentioned in the posting guide which you may find here:

[R] Help on install.packages() function

2010-11-02 Thread Christofer Bogaso
Hi, when I need to download some package I use for example install.packages(fBasics) function. However simply using that function needs additional intervention to select the server from which I want to download. I would like to ask the list how I can put additional argument in the

Re: [R] Help on install.packages() function

2010-11-02 Thread Joshua Wiley
Hi Chistofer, I selected a mirror in my .Rprofile file (which I think is fairly common), so I do not have to set it every time I start R. In any case, you just have to specify the url of the mirror you want to the CRAN repo. Something like this ought to work: r - getOption(repos) r[CRAN] -

[R] get the scripname within the executed myscript.r

2010-11-02 Thread Žroutík
Dear R-users! Is there a way to obtain the name of the executed myscript.r, i.e. when cmd rscript myscript.r is executed? (The name of the script in this case is myscript.r) Here is the explanation of why I would like to get that: Why: I have prepared a set of scripts (decompose_data.r,

Re: [R] How to stop showing messages while loading package?

2010-11-02 Thread Christofer Bogaso
Thanks Erik for your reply. However I would also like to stop showing messages while downloading ans installing package. For example I get following messages while I download fBasics: trying URL ' http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.10/fBasics_2110.79.zip' Content type

Re: [R] get the scripname within the executed myscript.r

2010-11-02 Thread Ivan Calandra
Hi, Not sure it would really help you since I haven't understood everything, but read ?list.files the pattern argument is quite convenient too. Ivan Le 11/2/2010 10:47, Žroutík a écrit : Dear R-users! Is there a way to obtain the name of the executed myscript.r, i.e. when cmd rscript

Re: [R] replace text at certain positions in a file

2010-11-02 Thread RINNER Heinrich
Hello, thanks again for this nice solution using sub and regular expressions! However, in real life I have to overwrite more than two positions with blanks (say 50 or so), so I was trying to modify this in the following way: s - c(ab34cd78e, fg3 hi78j) # your suggestion (works perfectly for

[R] help mkin

2010-11-02 Thread rebekka baumgartner
Hi, I am trying fit my kinetic data with the mkin package. There I have two questions: 1.) I would like to fix the parameter parent_0, the concentration of the parent at time 0. In the mkinfit function description it says you can do it with the arguments parms.ini and fixed_parms. In which

Re: [R] help mkin

2010-11-02 Thread rebekka baumgartner
Sorry, I copied in the wrong error message, this is the right one: Model cost at call 1 : 15535.3 DLSODA- Warning..Internal T (=R1) and H (=R2) are such that in the machine, T + H = T on the next step (H = step size). Solver will

Re: [R] Error message in fit.mult.impute (Hmisc package)

2010-11-02 Thread Frank Harrell
I tried your code with the rms package (replacement for the Design package; see http://biostat.mc.vanderbilt.edu/Rrms) and it worked fine. Note that multiple imputation needs the outcome variable in the imputation model. Frank - Frank Harrell Department of Biostatistics, Vanderbilt

Re: [R] question in using nlme and lme4 for unbalanced data

2010-11-02 Thread Mike Marchywka
Date: Mon, 1 Nov 2010 17:38:54 -0700 From: djmu...@gmail.com To: cy...@email.arizona.edu CC: r-help@r-project.org Subject: Re: [R] question in using nlme and lme4 for unbalanced data Hi: On Mon, Nov 1, 2010 at 3:59 PM, Chi Yuan wrote:

Re: [R] replace text at certain positions in a file

2010-11-02 Thread Gabor Grothendieck
On Tue, Nov 2, 2010 at 6:20 AM, RINNER Heinrich heinrich.rin...@tirol.gv.at wrote: Hello, thanks again for this nice solution using sub and regular expressions! However, in real life I have to overwrite more than two positions with blanks (say 50 or so), so I was trying to modify this in the

[R] spatial plots maps-ssplot

2010-11-02 Thread pelt
Hi all, I have made a plot with ssplot, using a SpatialPointsDataFrame. The content is quite simple, as I have 9 grid points with lon/lat coordinates and 9 values attached to these coordinates. They are in a square area of 3 by 3 gridboxes. I would like to lay a map from maps() over these

[R] R script on linux?

2010-11-02 Thread gokhanocakoglu
Dear all, I am conducting a simulation study for my thesis on R in windows xp platform but due to better performance and for gaining time I have to run the script on linux server(some kind of workstation). But I have no idea which format the codes should be in. Is there any converter for this

Re: [R] R script on linux?

2010-11-02 Thread Duncan Murdoch
On 02/11/2010 8:58 AM, gokhanocakoglu wrote: Dear all, I am conducting a simulation study for my thesis on R in windows xp platform but due to better performance and for gaining time I have to run the script on linux server(some kind of workstation). But I have no idea which format the codes

Re: [R] R script on linux?

2010-11-02 Thread gokhanocakoglu
I can't run the script the program doesn't work... -- View this message in context: http://r.789695.n4.nabble.com/R-script-on-linux-tp3023650p3023670.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] R script on linux?

2010-11-02 Thread Jonathan P Daily
What is the error message? -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the

[R] Question about ggplot2

2010-11-02 Thread Shige Song
Dear All, I am trying to graph a simple scatter plot where the x axis is year and the y axis is a percentage (percentage of infant death). Instead of plotting the raw data, I want to plot summary statistics such as mean and median. Here is the problem: the value range of y is between 0 and 1, but

[R] Setting the names of a data.frame

2010-11-02 Thread Santosh Srinivas
I have tData as below. I need to set the names with the headers from the first row in sHeaders Sorry .. forgot how to set the names from row in another data frame .. pls advise. names(tData) = sHeaders[1,] does not work correctly Also, why doesn't drop.levels(sHeaders) not work? dput(tData)

Re: [R] sqldf hanging on macintosh - works on windows

2010-11-02 Thread GL
Marc: Installing Simon's package worked perfectly. Thanks so much! -- View this message in context: http://r.789695.n4.nabble.com/sqldf-hanging-on-macintosh-works-on-windows-tp3022193p3023736.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] spliting first 10 words in a string

2010-11-02 Thread Gaj Vidmar
Though forbidden in this list, in Excel it's just (literally!) five clicks away! (with the column in question selected) Data - Text to Columns - Delimited - tick Space - Finish Pa je! (~Voila in Slovenian) (then import back to R, keeping only the first 10 columns if so desired) Regards, Assist.

[R] density() function: differences with S-PLUS

2010-11-02 Thread Nicola Sturaro Sommacal (Quantide srl)
Hello! Someone know what are the difference between R and S-PLUS in the density() function? For example, I would like to reply this simple S-PLUS code in R, but I don't understand which parameter I should modify to get the same results. S-PLUS CODE: density(1:1000, width = 4) R-CODE:

Re: [R] get the scripname within the executed myscript.r

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 5:47 AM, Žroutík wrote: Dear R-users! Is there a way to obtain the name of the executed myscript.r, i.e. when cmd rscript myscript.r is executed? (The name of the script in this case is myscript.r) commandArgs() Here is the explanation of why I would like to get

[R] individual intercept and slope

2010-11-02 Thread Rosario Garcia Gil
Hello I would like to extract the estimates for the intercept and slope by individual for growth from a lm fit. Any advice? Individual Time point Height 1 1 10 1 2 11 1 3 23 1

[R] system() and system2() functions

2010-11-02 Thread Ralph Olsson
Hello, I help to maintain a moderate library of R code. In this code we have a number of calls to the system function along the lines of: exe_output = system(./executable.exe,intern=T) We tend to prefer system() over shell() because, provided the executable has been compiled and the

Re: [R] Error message in fit.mult.impute (Hmisc package)

2010-11-02 Thread Kim Fernandes
Thank you! That has fixed the problem. Kim On Tue, Nov 2, 2010 at 7:42 AM, Frank Harrell f.harr...@vanderbilt.eduwrote: I tried your code with the rms package (replacement for the Design package; see http://biostat.mc.vanderbilt.edu/Rrms) and it worked fine. Note that multiple imputation

Re: [R] individual intercept and slope

2010-11-02 Thread Dimitris Rizopoulos
Have a look at function(s) lmList() from packages lme4 or nlme. I hope it helps. Best, Dimitris On 11/2/2010 3:14 PM, Rosario Garcia Gil wrote: Hello I would like to extract the estimates for the intercept and slope by individual for growth from a lm fit. Any advice? Individual Time point

Re: [R] Question about ggplot2

2010-11-02 Thread Abhijit Dasgupta
from where you are, year.plot+ylim(0,0.1) Abhijit On Nov 2, 2010, at 9:57 AM, Shige Song wrote: Dear All, I am trying to graph a simple scatter plot where the x axis is year and the y axis is a percentage (percentage of infant death). Instead of plotting the raw data, I want to plot

Re: [R] Question about ggplot2

2010-11-02 Thread Joshua Wiley
Dear Shige, You can use scale_y_continuous() to achieve this. year.plot - ggplot(d, aes(year, rate)) year.plot + stat_summary(fun.y = mean, geom = line) + scale_y_continuous(limits = c(0, .1)) where limits may be whatever you like for the y axis. Cheers, Josh On Tue, Nov 2, 2010 at 6:57

Re: [R] Using R for Production - Discussion

2010-11-02 Thread Douglas Bates
On Mon, Nov 1, 2010 at 11:04 PM, Santosh Srinivas santosh.srini...@gmail.com wrote: Hello Group, This is an open-ended question. Quite fascinated by the things I can do and the control I have on my activities since I started using R. I basically have been using this for analytical related

Re: [R] spliting first 10 words in a string

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 6:24 AM, Gaj Vidmar wrote: Though forbidden in this list, in Excel it's just (literally!) five clicks away! (with the column in question selected) Data - Text to Columns - Delimited - tick Space - Finish Pa je! (~Voila in Slovenian) (then import back to R, keeping only the

Re: [R] Setting the names of a data.frame

2010-11-02 Thread Ivan Calandra
Hi, The problem is that all your columns of sHeaders are factors. It might be better to set stringsAsFactors to FALSE when you build it. Or you can do it with a for loop like this: for (i in 1:length(sHeaders)){ names(tData)[i] - as.character(sHeaders[1,i]) } Or with lapply: names(tData) -

[R] Using data( ) in a loop

2010-11-02 Thread McCarthy, Ian
I'm trying to generate 50+ graphs using the UScensus2000tract data. I need to access the data for just about all of the states, so I was hoping to create a simple loop that will take the relevant state from my data and load the associated census data from the UScensus2000tract package. Below is

Re: [R] Setting the names of a data.frame

2010-11-02 Thread Santosh Srinivas
Thanks. Actually the sHeaders was a line in tData itself ... I just did sHeaders = tData [1,] How can I can build it without factors like your first suggestions? -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ivan Calandra Sent:

Re: [R] individual intercept and slope

2010-11-02 Thread Phil Spector
You didn't say what form you wanted the output in, but here's one way: sapply(split(dat,dat$individual),function(s)lm(height~time,data=s)$coef) 1 2 (Intercept) 8.47 19.87 time2.485714 -2.057143 - Phil Spector

[R] subset a data.frame

2010-11-02 Thread Simone Gabbriellini
Hello List, this should be simple, but cannot figure it out. I am trying to subset a data.frame like this: data4 userstime 1 user52009-12-01 14:09:58 2 user12009-12-01 14:40:16 3 user82009-12-04 08:18:37 4 user62009-12-04 08:18:37 5

Re: [R] Using data( ) in a loop

2010-11-02 Thread Dennis Murphy
Hi: On Tue, Nov 2, 2010 at 8:06 AM, McCarthy, Ian ian.mccar...@fticonsulting.com wrote: I'm trying to generate 50+ graphs using the UScensus2000tract data. I need to access the data for just about all of the states, so I was hoping to create a simple loop that will take the relevant state

Re: [R] subset a data.frame

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 11:53 AM, Simone Gabbriellini wrote: Hello List, this should be simple, but cannot figure it out. I am trying to subset a data.frame like this: data4 userstime 1 user52009-12-01 14:09:58 2 user12009-12-01 14:40:16 3 user8

[R] Add more functions or dataset in my package

2010-11-02 Thread Carla Moreira
Hello, I have constructed an R package, however, now I need to add a dataset in the package. How can I do it? Thank you very much in advance. -- Carla Moreira [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Strings from different locale

2010-11-02 Thread Phil Spector
Steven - Does typing Sys.setlocale('LC_ALL','C') before the offending command suppress the message? - Phil Spector Statistical Computing Facility Department of

Re: [R] subset a data.frame

2010-11-02 Thread Simone Gabbriellini
many thanks, works perfectly! best, Simone Il giorno 02/nov/2010, alle ore 17.17, David Winsemius ha scritto: On Nov 2, 2010, at 11:53 AM, Simone Gabbriellini wrote: Hello List, this should be simple, but cannot figure it out. I am trying to subset a data.frame like this: data4

Re: [R] Add more functions or dataset in my package

2010-11-02 Thread Uwe Ligges
See the manual Writing R Extensions. Uwe Ligges On 02.11.2010 17:13, Carla Moreira wrote: Hello, I have constructed an R package, however, now I need to add a dataset in the package. How can I do it? Thank you very much in advance. __

Re: [R] system() and system2() functions

2010-11-02 Thread Uwe Ligges
On 02.11.2010 15:16, Ralph Olsson wrote: Hello, I help to maintain a moderate library of R code. In this code we have a number of calls to the system function along the lines of: exe_output = system(./executable.exe,intern=T) We tend to prefer system() over shell() because, provided

Re: [R] Setting the names of a data.frame

2010-11-02 Thread Ivan Calandra
Wait wait, If sHeaders is actually the first line of tData, the question is how do you create/read this dataset in R? Isn't read from a text/csv file? In that case, set the header argument to TRUE. If not, there are probably better ways to do it, better than what you did (i.e. extract the

Re: [R] Setting the names of a data.frame

2010-11-02 Thread Santosh Srinivas
It is just read from a file that has introductory text in the beginning and a the header starts slight below so couldn’t use header as such. I just modified that dataset to ignore the earlier lines ... sHeaders = tData[4,] tData = tData [5:end] The original data was actually a

Re: [R] Using R for Production - Discussion

2010-11-02 Thread Saeed Abu Nimeh
I worked on a project where we used a random forest classifier to predict a binary response. We trained a model in the ec2 cloud with 3 million observations and 44 features. We stored the model that was generated by R using save(mymodel,file=model.Rdata). Now we use model.Rdata locally to predict

Re: [R] density() function: differences with S-PLUS

2010-11-02 Thread Joshua Wiley
Dear Nicola, There are undoubtedly people here who are familiar with both S+ and R, but they may not always be around or get to every question. In that case there are (at least) two good options for you: 1) Say what you want mathematically (something of a universal language) or statistically

Re: [R] Setting the names of a data.frame

2010-11-02 Thread Ivan Calandra
There is also a header argument in readHTMLtable() About the file itself, can't you just erase the introductory text? There is also a skip argument to read.table() that might help you. It's fine if my solution works, but I think it's still safer/easier to import the file directly with the

[R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread Rainer Hurling
Inspired by colouring the dots of box-whisker plots I am trying to also fill the boxes (rectangles) with different colours. This seems not to work as I expected. Looking at the help page of panel.bwplot it says: 'fill - color to fill the boxplot'. Obviously it is only intended to fill all

Re: [R] Please help me about Monte Carlo Permutation

2010-11-02 Thread Łukasz Ręcławowicz
2010/11/2 Chitra cbban...@gmail.com yes Me too. So you want to do a MC test for Pearson's product-moment correlation, right...? So for sample sizes from 3 to about 10 we can use all permutations [permn(combinat)]- test will be exact! (In our case 7!=5040) lg-lightgreen g-green

[R] cov.mve error

2010-11-02 Thread Marino Taussig De Bodonia, Agnese
Hello, I am trying to use the cov.mve function on a set of variables to check for outliers, before I perform PCA on them. I am using the code that I found on Everitt (2005) An R ans S-Plus companion to multivariate analysis but its doesn't seem to work. I wrote: at.central-central[,7:17]

[R] Relsurv package

2010-11-02 Thread Laurence Lauvier
Hello, I have a question about relsurv package particularly rsadd function: Rsadd(Surv(time,cens)~sex+ratetable(age=age*365.24,sex=sex,year=year),data=,=ratetable=,int=5,method=”max.lik”). In the tutorial, it is indicated that the age and year must be given in the date format, i.e. in number

[R] One question on heatmap

2010-11-02 Thread Hua
Dear R-helper: Suppose we have a matrix: Genesample1 sample2 Gcnt112.52.8 Max 8.800039.1 Tmem176b 67.9000 304.7 Shmt2 8.600042.4 Rtn4 11.500057.7 Il17re7.600038.8

Re: [R] One question on heatmap

2010-11-02 Thread Peter Langfelder
Before plotting a heatmap we usually standardize all genes to mean zero and variance 1. That way the green/red represent under/over expression with respect to the mean expression, which is roughly what the original 2-color arrays (that literally produced such heatmaps) were measuring. Of course,

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 1:19 PM, Rainer Hurling wrote: Inspired by colouring the dots of box-whisker plots I am trying to also fill the boxes (rectangles) with different colours. This seems not to work as I expected. Looking at the help page of panel.bwplot it says: 'fill - color to fill the

[R] timeSequence

2010-11-02 Thread Carla Leal Kaymalyz
Hello, I have time series data whose days are not consecutive. I used timeSequence (from = 4/1/2010, to = 31/12/2010, format = % Y-% m-% d, FinCenter = GMT) to generate a vector of consecutive days , however I need not consider Sunday as well join this vector to a data frame containing incomplete

Re: [R] Relsurv package

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 12:29 PM, Laurence Lauvier wrote: Hello, I have a question about relsurv package particularly rsadd function: Rsadd(Surv(time,cens)~sex + ratetable (age = age *365.24,sex=sex,year=year),data=,=ratetable=,int=5,method=”max.lik”). In the tutorial, it is indicated that

Re: [R] R script on linux?

2010-11-02 Thread Thomas Levine
Open a terminal, then run these two commands. cd /home/the/directory/with/your/script R Then run this in R source('yourscript.R') Tom 2010/11/2 Jonathan P Daily jda...@usgs.gov: What is the error message? -- Jonathan P. Daily Technician - USGS Leetown

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread Rainer Hurling
On 02.11.2010 19:08 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 1:19 PM, Rainer Hurling wrote: Inspired by colouring the dots of box-whisker plots I am trying to also fill the boxes (rectangles) with different colours. This seems not to work as I expected. Looking at the help page of

Re: [R] R script on linux?

2010-11-02 Thread Jonathan P Daily
Alternatively, you can simply prefix all scripts with #! /path/to/R/Rscript ... where the path is usually /usr/bin/ This info is in the manual that comes packaged with R under, conveniently, the scripting section. I assumed that he was getting some error message. Likely, the script was not

Re: [R] spliting first 10 words in a string

2010-11-02 Thread Matevž Pavlič
Hi all, Thanks for all the help. I managed to do it with what Gaj suggested (Excel :(). The last solution from David is also freat i just don't undestand why R put the words in 14 columns and thre rows? I would like it to put just the first 10 words in source field to 10 diefferent

Re: [R] multicore package: help

2010-11-02 Thread Patrick Connolly
On Mon, 01-Nov-2010 at 06:10PM -0400, Fahim M wrote: | I have matrices as below: | | a - matrix(c(1:10, 11, 12), 3,4) | aa - data.frame(a) | | b - matrix(c(10:20, 21), 4,3) | bb - data.frame(b) | ... | and many more matrices. | | st = list(aa,bb, . ) There's probably a tidier way to do

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 2:32 PM, Rainer Hurling wrote: On 02.11.2010 19:08 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 1:19 PM, Rainer Hurling wrote: Inspired by colouring the dots of box-whisker plots I am trying to also fill the boxes (rectangles) with different colours. This seems not

Re: [R] object .trPaths not found

2010-11-02 Thread Spackenkasper
I had the problem as well. It seems that the reason was that Windows doesn't allow ordinary administrators to edit files in the installation drive C: . So I - and Tinn-R - couldn't edit the files in the R directory etc. You can circumvent it by restarting your system with User Account Control

Re: [R] spliting first 10 words in a string

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 3:01 PM, Matevž Pavlič wrote: Hi all, Thanks for all the help. I managed to do it with what Gaj suggested (Excel :(). The last solution from David is also freat i just don't undestand why R put the words in 14 columns and thre rows? Because the maximum number of

[R] Multiple imputation for nominal data

2010-11-02 Thread John Sorkin
I am looking for an R function that will run multiple imputation (perhaps fully conditional imputation, MICE, or sequential generalized regression) for non-MVN data, specifically nominal data. My dependent variable is dichotomous, all my predictors are nominal. I have a total of 4,500 subjects,

[R] predict() for plm?

2010-11-02 Thread max . e . brown
Hi, I have a small N large T panel which I am estimating via plm, with fixed effects. Is there any way to get predicted values for a new dataset? (I want to estimate parameters on a subset of my sample, and then use these to calculate model-implied values for the whole sample). Alternatively,

Re: [R] spliting first 10 words in a string

2010-11-02 Thread steven mosher
Thanks david. Matevz, maybe I can help explain by doing a very simple and brute force approach as opposed to the way david did it. But you should learn his methods. I will just do a subset of your problem and if you understand how it works then you should be able to get something done and

Re: [R] visualize TukeyHSD results

2010-11-02 Thread Mendiburu, Felipe (CIP)
Dear Timothy, Use library(agricolae) library(agricolae) a = aov(Weight~Feed) HSD.test(a,Feed) HSD.test(a,Feed, group=TRUE) HSD.test(a,Feed, group=FALSE) Regards, Felipe de Mendiburu. http://tarwi.lamolina.edu.pe/~fmendiburu International Potato Center. www.cipotato.org University: Agraria

Re: [R] spliting first 10 words in a string

2010-11-02 Thread Matevž Pavlič
Hi, Ok, i got this now. At least i think so. I got a data.frame with 15 fields, all other words have bee truncated. Which is what i want. But ia have that in a seperate data.frame from that one it was before (would be nice if it would be in the same ...) 'data.frame': 22801 obs. of 15

[R] multi-level cox ph with time-dependent covariates

2010-11-02 Thread Mattia Prosperi
Dear all, I would like to know if it is possible to fit in R a Cox ph model with time-dependent covariates and to account for hierarchical effects at the same time. Additionally, I'd like also to know if it would be possible to perform any feature selection on this model fit. I have a data set

Re: [R] Multiple imputation for nominal data

2010-11-02 Thread Andrew Miles
There are a couple of packages that do MI, including MI for nominal data. The most recent of these is mi, but I believe mice might do it as well. Both are available on the CRAN, and both have useful articles that teach you how to use them. The citations for these articles can be found

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread Rainer Hurling
On 02.11.2010 20:08 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 2:32 PM, Rainer Hurling wrote: On 02.11.2010 19:08 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 1:19 PM, Rainer Hurling wrote: Inspired by colouring the dots of box-whisker plots I am trying to also fill the boxes

Re: [R] coxph linear.predictors

2010-11-02 Thread Bond, Stephen
Re: 1. X*beta != linear.predictor. The equality is stated in three different help docs, which is misleading, especially in light of the way glm is set up. I felt like was wrestling with SAS :-) The relative risk was the original idea behind cox regression, but it can be used for many

Re: [R] density() function: differences with S-PLUS

2010-11-02 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Nicola Sturaro Sommacal (Quantide srl) Sent: Tuesday, November 02, 2010 3:05 AM To: r-help@r-project.org Subject: [R] density() function: differences with S-PLUS Hello!

Re: [R] ForestPlot or similar

2010-11-02 Thread Mestat
Thanks Matt, I am having a problem now to use this function. The function separately works fine. But the problem is that I am working with a simulation, so i placed the CREDPLOT function in my program and added the following commands according my data: #MY DATA, ESTIMATES, LOWER AND UPPER

Re: [R] Multiple imputation for nominal data

2010-11-02 Thread John Sorkin
Thank you! John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 4:07 PM, Rainer Hurling wrote: snipped quite a bit of talking past each otther Of course your example with eight colours works, too. But as you can see in the plot, the colours have different order then in the vector 'colors()[(2:9)*10]' itself. I expected the first box

[R] Display of NAs in character columns of a data frame under fix() or edit().

2010-11-02 Thread Rolf Turner
Example: xxx - data.frame(x=1:26,y=letters) xxx$x[c(2,4,6,8)] - NA xxx$y[c(1,3,5,7)] - NA yyy - edit(yyy) The missing values in xxx$y appear as blanks in the spreadsheet window that appears, whereas the missing values in the numeric column x appear as NA (as I

Re: [R] splitting First 10 words in a string

2010-11-02 Thread Matevž Pavlič
Hi Steven, Thank you for the help. I get an error though when i do this : lit-read.csv(litologija.csv, sep=;, dec=.) sent -data.frame(sentence=lit$Opis,stringsAsFactors=FALSE) str(sent) sentV-rep(sent,10) str(sentV)

Re: [R] ForestPlot or similar

2010-11-02 Thread Abhijit Dasgupta
You need to use a print statement print(forestplot()) Lattice and ggplot2 need to be explicitly printed to get output into jpeg. I believe Matt's function only provides the graphics object and not the printed version. Abhijit On 11/2/2010 4:32 PM, Mestat wrote: Thanks Matt, I am having

[R] Hooks into dynamic help system?

2010-11-02 Thread Kevin Wright
What is the easiest way to modify the dynamic html help files? For example, I would like to put this link on every page: R path/doc/html/packages.htmlhttp://127.0.0.1:15002/doc/html/packages.html Or a link to the Rseek engine with the title of the page passed as a parameter to Rseek. etc. Do I

[R] stacking effectively - without loops

2010-11-02 Thread Dimitri Liakhovitski
Hello! I have 2 vectors: x-letters[1:5] y-1:3 Is there a way - without loops - to create a data frame such that we repeat the whole y within each level of x so that it looks like this: a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3 etc? Thank you! -- Dimitri Liakhovitski Ninah Consulting

Re: [R] stacking effectively - without loops

2010-11-02 Thread Dimitri Liakhovitski
Never mind - found it: expand.grid(y,x) On Tue, Nov 2, 2010 at 4:57 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! I have 2 vectors: x-letters[1:5] y-1:3 Is there a way - without loops - to create a data frame such that we repeat the whole y within each level of x

Re: [R] stacking effectively - without loops

2010-11-02 Thread Johannes Huesing
Dimitri Liakhovitski dimitri.liakhovit...@gmail.com [Tue, Nov 02, 2010 at 09:57:04PM CET]: Hello! I have 2 vectors: x-letters[1:5] y-1:3 Is there a way - without loops - to create a data frame such that we repeat the whole y within each level of x so that it looks like this: a 1

Re: [R] stacking effectively - without loops

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 4:58 PM, Dimitri Liakhovitski wrote: Never mind - found it: expand.grid(y,x) Yes, that is one way and is a way that was illustrated yesterday for a very similar question on r-help by (perhaps?) Grothendieck). Another way is: data.frame(lets = rep(letters[1:5],

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread Rainer Hurling
On 02.11.2010 21:43 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 4:07 PM, Rainer Hurling wrote: snipped quite a bit of talking past each otther Of course your example with eight colours works, too. But as you can see in the plot, the colours have different order then in the vector

[R] count different words in a field

2010-11-02 Thread Matevž Pavlič
Hi all, I started to ask this in the other post, but it is off topis...so here it is again. I have a data.frame (created with the helpof this mail list) that looks like this : 'data.frame': 22801 obs. of 15 variables: $ V1 : chr HUMUS SLABO MALO SLABO ... $ V2 : chr IN

Re: [R] count different words in a field

2010-11-02 Thread Matevž Pavlič
Nevermind, i think summary() does this ... -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Matevž Pavlič Sent: Tuesday, November 02, 2010 10:12 PM To: r-help@r-project.org Subject: [R] count different words in a field Hi all,

Re: [R] connecting points into a smooth curve

2010-11-02 Thread Greg Snow
In addition to the other responses you have received, the xspline function may also be of use. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 5:08 PM, Rainer Hurling wrote: On 02.11.2010 21:43 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 4:07 PM, Rainer Hurling wrote: snipped quite a bit of talking past each otther Of course your example with eight colours works, too. But as you can see in the plot, the

Re: [R] count different words in a field

2010-11-02 Thread David Winsemius
On Nov 2, 2010, at 5:11 PM, Matevž Pavlič wrote: Hi all, I started to ask this in the other post, but it is off topis...so here it is again. I have a data.frame (created with the helpof this mail list) that looks like this : ? table tbl - table(c(HUMUS, SLABO, MALO, SLABO))

[R] Line numbers in Sweave

2010-11-02 Thread Yihui Xie
Hi, I thumbed through the source code Sweave.R but was unable to figure out when (under what conditions) R will insert the line numbers to the output. The R 2.12.0 news said: • Parsing errors detected during Sweave() processing will now be reported referencing their original location

Re: [R] Colour filling in panel.bwplot from lattice

2010-11-02 Thread Rainer Hurling
On 02.11.2010 22:37 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 5:08 PM, Rainer Hurling wrote: On 02.11.2010 21:43 (UTC+1), David Winsemius wrote: On Nov 2, 2010, at 4:07 PM, Rainer Hurling wrote: snipped quite a bit of talking past each otther Of course your example with eight

  1   2   >