[R] geepack installation problem?

2010-05-31 Thread Denis B
Hello R Forum members. I have installed for my statistician user, apparently without error, both the concord and geepack packages. The target system is R 2.10.1 on a 64-bit RedHat Enterprise Linux platform. However when she attempts to invoke a function in geepack, for example...

[R] Creating dropout time from longitudinal data with missing data

2010-05-31 Thread john james
Dear R users,   Please assist me with the following problem. I have a dataset that looks like the following:   dat-data.frame(   'id'=rep(c(1,2,3),each=3),   'time'=rep(c(1,2,3),3),   'y'= c(2,2,NA,2,NA,NA,2,5,7) )   I wish to create a variable for dropout time in dataframe 'dat' such that the

Re: [R] Kalman Filter

2010-05-31 Thread Johann Hibschman
Greigiano Jose Alves alves...@gmail.com writes: I am working on an article forecasting, which use the dynamic linear model, a model state space. I am wondering all the commands in R, to represent the linear dynamic model and Kalman filter. I am available for any questions. There are a few

[R] error on Windows OS

2010-05-31 Thread M.Ribeiro
I received by email an R package (file.tar.gz) that was created in Linux. The package was already installed in another computer in linux using install.packages and it worked I am not familiar with installing packages but I would like to install it on Windows I downloaded the Rtools29.exe and

Re: [R] how to run the R script in windows in background mode or script mode?

2010-05-31 Thread jim holtman
It depends on what you C shell scripts are doing. If they are simply invoking R, then you can install R, and the required packages, on the Windows PC and then use batch files under Windows to call your scripts. Running R in the background on Windows is not a problem. On Sat, May 29, 2010 at

[R] Res: How to use the function glht of multcomp package to test interaction?

2010-05-31 Thread Ivan Allaman
Hi Richard, First thank you for your attention. Actually the way it approached the examples of statements do not like a lot, because the calculations are done separately for each factor of interest to the interaction. Why will not it pleases me so much? Tukey's tests as for example using the

[R] miss.loc function in MCMC Geneland: can't make it work

2010-05-31 Thread Dzive
I am trying to use the function 'filter.NA=TRUE' in Geneland. The function appears to be set on TRUE by default, as it appears as TRUE in the 'parameter.txt' file output and hence I do not need to enter the function per se (as it is an 'Unused argument otherwise') . Hence all my missing data

[R] Removing columns from data frame referenced by column index

2010-05-31 Thread suman dhara
Can you suggest me any way to remove a column of a data frame by the column number,not by the column name. Thanks, Suman Dhara [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] getting the column name of a data frame

2010-05-31 Thread suman dhara
Sir, I want to store the column name of a data frame as a vector and use the vector to remove a column of the data frame ,if required. Thanks, Suman Dhara [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] error on Windows OS [SEC=UNCLASSIFIED]

2010-05-31 Thread Augusto.Sanabria
Hi M. Ribeiro, For Windows you need to download the correct package (*.zip) not the Linux package. Once the windows package has been downloaded into a directory, you can install it directly from the R shell, see Packages install packages from local zip files. Once the package has been installed

[R] Post-hoc tests for repeated measures in balanced experimental design

2010-05-31 Thread Thomas Meigen
Hi, I am performing experiments in the field of visual perception where we often apply balanced designs. Within a group of normal subjects, we vary different stimulus conditions (like contrast, luminance, temporal frequency of stimulation) and derive some psychophysical or

Re: [R] getting the column name of a data frame

2010-05-31 Thread Albert-Jan Roskam
df - data.frame(x = runif(10), y = runif(10), z = runif(10)) colnames - names(df) df2 - df[!colnames %in% c(x, y)] df2 Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public

Re: [R] Creating dropout time from longitudinal data with missing data

2010-05-31 Thread Dennis Murphy
Hi: Here are a few ways: (1) ave(): transform(dat, dropout.time = ave(y, id, FUN = function(x) sum(!is.na(x (2) same as (1) without the transform() statement: dat$dropout.time - ave(y, id, FUN = function(x) sum(!is.na(x))) dat (3) ddply() in the plyr package: library(plyr) snisna -

[R] Replacing NAs with 0 for a list of data frames

2010-05-31 Thread Kang Min
Hi, I have a list of 100 data frames, each data frame has 50 obs of 377 variables. I would like to replace all the NAs with 0 in all the dataframes. Should I have a for loop for every data frame? Below is an extract of how the data looks like. List of 100 $ :'data.frame':50 obs. of

[R] running admb from R using system()

2010-05-31 Thread Benedikt Gehr
Hi I'm trying to run an admb model from R by using the system () command. The admb model runs fine when running it from the admb command line or when using emacs. However when I try it with system() then R crashes every time. And I tried using the R command line and RGui and in both it

[R] store and repeat data based on row names (loop, if statement)

2010-05-31 Thread RCulloch
Hello fellow R users, I have an issue that has me a little confused - sorry if the subject makes little sense, I wasn't sure how to refer to this problem. I have a data set I've extracted from ArcInfo (a section is shown below). It is spatial data, showing the distance from one ID to another. I

[R] about heatmap

2010-05-31 Thread 孟欣
Hi all: As to the heatmap function, the default style is red and yellow,and red refers to low level and yellow refers to high level. How can I change the style to the contrary: red refers to high level and yellow refers to low level? Thanks a lot! My best [[alternative HTML version

Re: [R] Peak Over Threshold values

2010-05-31 Thread Tonja Krueger
Thanks a lot for your help. That’s the time period I was looking for. I’ve got one more question: for further analyses I need the respective maximum values within these time periods (between the green and red lines). Preferably in combination with the date the maximum event happened. Thank

Re: [R] Replacing NAs with 0 for a list of data frames

2010-05-31 Thread Tal Galili
I would consider trying the plyr package using the llply function. With something like: require(plyr) func - function(xx) { xx[is.na(xx)] - 0 return(xx) } llply(your.df.list, func) What I wondering is why you want to do this. Best, Tal Contact

Re: [R] Linear Discriminant Analysis in R

2010-05-31 Thread Joris Meys
I checked your data. Now I have to get some sense out of your code. You do : G - vowel_features[15] cvc_lda - lda(G~ vowel_features[15], data=mask_features, na.action=na.omit, CV=TRUE) Firstly, as I suspected, you need to select a column by using vowel_features[,15] . Mind the comma!

[R] R 2.11.1 is released

2010-05-31 Thread Peter Dalgaard
I've rolled up R-2.11.1.tar.gz a short while ago. This is an update release, which fixes a number of mostly minor issues. The most annoying one was probably the problem with format.POSIXlt causing C stack overflow on long date vectors. See the full list of changes below. You can get it from

[R] What does LOESS stand for?

2010-05-31 Thread Peter Neuhaus
Dear R-community, maybe someone can help me with this: I've been using the loess() smoother for quite a while now, and for the matter of documentation I'd like to resolve the acronym LOESS. Unfortunately there's no explanation in the help file, and I didn't get anything convincing from google

[R] Comparing multiple columns in matrix

2010-05-31 Thread Noah Silverman
We're running Monte Carlo repeated measures for several groups. The goal is to determine the number of time each group has the highest score. A toy example: [,1] [,2] [,3] 0.1 0.2 0.3 0.1 0.2 0.3 0.1 0.2 0.3 0.1 0.3 0.2 0.1 0.3 0.2 0.2 0.3 0.1 For this example:

Re: [R] Comparing multiple columns in matrix

2010-05-31 Thread Dennis Murphy
Hi: Here's one approach. Let x be your matrix; then table(apply(x, 1, which.max)) 2 3 3 3 If you prefer the result in data frame form, then as.data.frame(table(apply(x, 1, which.max))) Var1 Freq 123 233 HTH, Dennis On Mon, May 31, 2010 at 2:39 AM, Noah Silverman

Re: [R] Removing columns from data frame referenced by column index

2010-05-31 Thread sayan dasgupta
data(airquality) head(airquality) Suppose you want to remove the 1st and the 3rd column this will do airquality[,-c(1,3)] suman dhara wrote: Can you suggest me any way to remove a column of a data frame by the column number,not by the column name. Thanks, Suman Dhara

[R] How to delete the previously saved workspace restored

2010-05-31 Thread Yanwei Tan
Dear all, I am a new user of R, here I have a question about remove the previous restored workspace. I saved the workspace last time, but R always automatically load the workspace when I open it. I try to remove the object and then close R without saving. But next time when I open R, it

Re: [R] geepack installation problem?

2010-05-31 Thread Peter Ehlers
On 2010-05-31 0:46, Denis B wrote: Hello R Forum members. I have installed for my statistician user, apparently without error, both the concord and geepack packages. The target system is R 2.10.1 on a 64-bit RedHat Enterprise Linux platform. However when she attempts to invoke a function in

Re: [R] Post-hoc tests for repeated measures in balanced experimental design

2010-05-31 Thread Thomas Meigen
Dear Dennis, thank you for your fast response. Perhaps I should have described the experimental situation in more detail. This tells you that Subject is being treated as a random block factor, and that Conditions 1 and 2 are combinations of treatments applied to each subject. In other

Re: [R] What does LOESS stand for?

2010-05-31 Thread Prof Brian Ripley
See http://en.wikipedia.org/wiki/Loess . It is not an acronym: the derivation is given in the reference given by ?loess, p.314. On Mon, 31 May 2010, Peter Neuhaus wrote: Dear R-community, maybe someone can help me with this: I've been using the loess() smoother for quite a while now, and

Re: [R] error on Windows OS

2010-05-31 Thread Duncan Murdoch
M.Ribeiro wrote: I received by email an R package (file.tar.gz) that was created in Linux. The package was already installed in another computer in linux using install.packages and it worked I am not familiar with installing packages but I would like to install it on Windows I downloaded the

[R] Building a what list for scan to use

2010-05-31 Thread Alex van der Spek
Using read.table now on large files. Scan should be faster reading and parsing the files if a 'what' list is provided. How would I generate a what list that repeats the the last 4 elements n (n=14 or 10 or 8) times? whatlist=list(Tstamp=,Condition=0,A1=0,B1=0,C1=0,D1=0) All are numeric,

[R] missing values in autocorelation

2010-05-31 Thread nuncio m
Hi all, I am trying to find the autocorrelation of some time series. I have say 100 files, some files have only missing values(-99.99, say). I dont want to exclude these files as they represent some points in a grid. But when the acf command is issued i get an error. Error in

[R] accessing a data frame with row names

2010-05-31 Thread e-letter
Readers, I have entered a file into r: ,column1,column2 row1,0.1,0.2 row2,0.3,0.4 using the command: dataframe-read.table(/path/to/file.csv,header=T,row.names=1) When I try the command: dataframe[,2] I receive the response: NULL I was expecting: row1 0.2 row2 0.4 What is my error with

[R] Vegan fisher.alpha error

2010-05-31 Thread Kang Min
Hi, I have an error with fisher.alpha from the vegan package. fisher.alpha(data[[1]]) Error in nlm(Dev.logseries, n.r = n.r, p = p, N = N, hessian = TRUE, ...) : missing value in parameter I am trying to find fisher alpha for a list of 100 data frames, and I tried it on individual data

Re: [R] Replacing NAs with 0 for a list of data frames

2010-05-31 Thread Kang Min
Thanks, it works except that I had to add xx - as.data.frame(xx) into func. I am trying to calculate diversity indices using the vegan package, and the functions require zeroes instead of NAs. Thanks. Kang Min On May 31, 5:09 pm, Tal Galili tal.gal...@gmail.com wrote: I would consider trying

Re: [R] about heatmap

2010-05-31 Thread Joris Meys
Hi, Take a look at the heatmap.2 function in the library gplots, and the brewer.pal in the library RColorBrewer. With this combination you have a far bigger flexibility on the colors and the output, plus you get a colorcoded legend. There used to be a bug in that function distorting the legend

Re: [R] error on Windows OS

2010-05-31 Thread Peter Dalgaard
On May 31, 2010, at 12:53 PM, Duncan Murdoch wrote: That's the one that stopped the install. Apparently the Rtools bin directory is not being found by Windows in your PATH. The Rtools installer can put it there; maybe you should just reinstall Rtools and choose that option. Also notice

Re: [R] accessing a data frame with row names

2010-05-31 Thread Gabor Grothendieck
Use read.csv or read.table(..., sep = ,). Also note that if you delete the first comma of the header (as in the second example below) you won't have to specify row.names since it can figure it out from the fact that there is one fewer column name than data fields. Lines - ,column1,column2 +

Re: [R] R 2.11.1 is released

2010-05-31 Thread Dr. David Kirkby
On 05/31/10 10:16 AM, Peter Dalgaard wrote: I've rolled up R-2.11.1.tar.gz a short while ago. This is an update release, which fixes a number of mostly minor issues. The most annoying one was probably the problem with format.POSIXlt causing C stack overflow on long date vectors. See the full

Re: [R] Building a what list for scan to use

2010-05-31 Thread Duncan Murdoch
On 31/05/2010 7:07 AM, Alex van der Spek wrote: Using read.table now on large files. Scan should be faster reading and parsing the files if a 'what' list is provided. How would I generate a what list that repeats the the last 4 elements n (n=14 or 10 or 8) times?

Re: [R] accessing a data frame with row names

2010-05-31 Thread Ivan Calandra
Hi, Let's create your data.frame: dataframe - structure(list(column1 = c(0.1, 0.3), column2 = c(0.2, 0.4)), .Names = c(column1, column2), row.names = c(row1, row2), class = data.frame) dataframe[,2] [1] 0.2 0.4 dataframe[,2, drop=FALSE] column2 row1 0.2 row2 0.4 So I don't

Re: [R] What does LOESS stand for?

2010-05-31 Thread Joris Meys
This is the paper on which the loess algorithm is based in general: http://www.econ.pdx.edu/faculty/KPL/readings/cleveland88.pdf The explanation about the origin of the term LOESS is given on page 597. Cheers Joris On Mon, May 31, 2010 at 11:33 AM, Peter Neuhaus pneuh...@pneuhaus.dewrote:

Re: [R] R 2.11.1 is released

2010-05-31 Thread Peter Dalgaard
On May 31, 2010, at 1:38 PM, Dr. David Kirkby wrote: On 05/31/10 10:16 AM, Peter Dalgaard wrote: CHANGES IN R VERSION 2.11.1 INSTALLATION o Command 'gnutar' is preferred to 'tar' when configure sets TAR. This is needed on Mac OS 10.6, where the default

Re: [R] missing values in autocorelation

2010-05-31 Thread Joris Meys
Could you specify the problem and give a minimal example that represents your datastructure and reproduces the error? See also the posting guides : http://www.R-project.org/posting-guide.htmlhttp://www.r-project.org/posting-guide.html Cheers Joris On Mon, May 31, 2010 at 1:12 PM, nuncio m

[R] after updating biomaRt cannot connect any more

2010-05-31 Thread mauede
I recently updated R 2.10.1 Patched (2010-02-20 r51163) This morning I reinstalled biomaRt using biocLite. Now I can no more connect to biomaRt and even the following instruction is hanging for a while until the same error message pops up. listMarts() Error in value[[3L]](cond) : Request to

Re: [R] about heatmap

2010-05-31 Thread Jorge Ivan Velez
Hi there, Take a look at http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/r/heatmap/ HTH, Jorge On Mon, May 31, 2010 at 3:54 AM, 孟欣 wrote: Hi all: As to the heatmap function, the default style is red and yellow,and red refers to low level and yellow refers to high

Re: [R] How to delete the previously saved workspace restored

2010-05-31 Thread David Winsemius
On May 31, 2010, at 5:10 AM, Yanwei Tan wrote: Dear all, I am a new user of R, here I have a question about remove the previous restored workspace. I saved the workspace last time, but R always automatically load the workspace when I open it. I try to remove the object and then close

[R] read in data file into R

2010-05-31 Thread Benedikt Gehr
Hi I'm trying to read a data file with output from another program (admb) into R for further analysis. However I'm not very successfull. The file extension for the data file is file.rep but it also doesn't help when I change it to file.txt I have two problems/questions: 1. The file is a

Re: [R] read in data file into R

2010-05-31 Thread jim holtman
Try using 'scan' to read in the data: x - scan(textConnection(3709.17 2660.93 2045.36 2090.33 2096.93 2205.65 2083.72 1797.53 1884.61 1946.59 2101.66 2220.03 2080.04 2097.07 2332.9 2325.47 2091.67 2091.54 2072.38 2025.31 1919.54 1781.95 1867.96 1685.12 1826.31 1654.25 1593.84 1430.96

Re: [R] read in data file into R

2010-05-31 Thread Ivan Calandra
Hi, For your first question, scan() might do what you want. I have never used it, but if I understood it well, it should do what you're looking for. See ?scan I would separate your 2nd file. But someone else more competent probably knows a better way for both questions HTH, Ivan Le

Re: [R] read in data file into R

2010-05-31 Thread Peter Ehlers
On 2010-05-31 7:47, Benedikt Gehr wrote: Hi I'm trying to read a data file with output from another program (admb) into R for further analysis. However I'm not very successfull. The file extension for the data file is file.rep but it also doesn't help when I change it to file.txt I have two

Re: [R] How to delete the previously saved workspace restored

2010-05-31 Thread Joris Meys
If you start R, type : unlink(.RData) This deletes the workspace file. Cheers Joris On Mon, May 31, 2010 at 11:10 AM, Yanwei Tan t...@nbio.uni-heidelberg.dewrote: Dear all, I am a new user of R, here I have a question about remove the previous restored workspace. I saved the workspace

Re: [R] read in data file into R

2010-05-31 Thread David Winsemius
On May 31, 2010, at 9:47 AM, Benedikt Gehr wrote: Hi I'm trying to read a data file with output from another program (admb) into R for further analysis. However I'm not very successfull. The file extension for the data file is file.rep but it also doesn't help when I change it to

Re: [R] read in data file into R

2010-05-31 Thread jim holtman
Here is the answer to your second part. You can use the one file and look for some type of indicator between each section. I used the example you sent: input - readLines('/temp/tempxx.txt') Warning message: In readLines(/temp/tempxx.txt) : incomplete final line found on '/temp/tempxx.txt'

Re: [R] How to delete the previously saved workspace restored

2010-05-31 Thread jim holtman
The easiest way (I use WIndows) is to start each session without loading the previous workspace. I explicitly save what I need and then explicitly restore it. In most cases, I always reconstruct the data I need. I use the '--no-restore --no-save' options. On Mon, May 31, 2010 at 10:04 AM,

Re: [R] store and repeat data based on row names (loop, if statement)

2010-05-31 Thread jim holtman
try this: x - read.table(textConnection(TO DISTID + 1 2.63981 'A1' + 2 0 'A1' + 3 6.95836 'A1' + 4 8.63809 'A1' + 1 0 'A1.1' + 2 2.63981 'A1.1' + 3 8.03071 'A1.1' + 4 8.90896 'A1.1' + 1 8.90896 'A2'

[R] two questions about PLOT

2010-05-31 Thread Jie TANG
here ,I want to plot two lines in one figure.But I have two problems 1) how to move one of the y-axis to be the right ? I tried to the commandaxis(2),But I failed. 2) how to add the axis information correctly.Since I have use the cmommand axis(1,at=1:6,labels=gradeinfo$gradenam) but it seems

[R] Y-axis range in histograms

2010-05-31 Thread Aarne Hovi
Hi, I'm trying to create a histogram with R. The problem is that the frequency is high for a couple of x-axis categories (e.g. 1500) and low for most of the x-axis categories (e.g. 50) http://r.789695.n4.nabble.com/file/n2237476/LK3_hist.jpg . When I create the histogram, it is not very

Re: [R] two questions about PLOT

2010-05-31 Thread Ivan Calandra
Hi, Not sure it is the best solution, but I would create the layout of the plot part by part: plot(type=n) #does not plot axis(1, at=1:6,...) #set the x-axis at the bottom axis(4,...) #set the y-axis on the right. I'm not sure that's what you were looking for, didn't really understand it

Re: [R] Y-axis range in histograms

2010-05-31 Thread Andy Rominger
A few ideas: Make a log-scale y-axis like: hist(my.data,...,log=y) argument yaxp can help make the ticks look pretty...see ?par. Or use various functions from the package `plotirx': axis.break and gap.barplot might be helpful. For those functions, you'll probably need to get your frequencies

Re: [R] Y-axis range in histograms

2010-05-31 Thread Ted Harding
On 31-May-10 14:49:43, Aarne Hovi wrote: Hi, I'm trying to create a histogram with R. The problem is that the frequency is high for a couple of x-axis categories (e.g. 1500) and low for most of the x-axis categories (e.g. 50) http://r.789695.n4.nabble.com/file/n2237476/LK3_hist.jpg .

Re: [R] What does LOESS stand for?

2010-05-31 Thread Peter Neuhaus
Thanks a lot... ... makes it a bit difficult to explain, though... Peter Quoting Joris Meys jorism...@gmail.com: This is the paper on which the loess algorithm is based in general: http://www.econ.pdx.edu/faculty/KPL/readings/cleveland88.pdf The explanation about the origin of the term

Re: [R] What does LOESS stand for?

2010-05-31 Thread David Winsemius
On May 31, 2010, at 11:44 AM, Peter Neuhaus wrote: Thanks a lot... ... makes it a bit difficult to explain, though... We drink no wine before its time. Somewhat like trying to explain splines to non-technical types:

Re: [R] after updating biomaRt cannot connect any more

2010-05-31 Thread Uwe Ligges
On 31.05.2010 14:03, mau...@alice.it wrote: I recently updated R 2.10.1 Patched (2010-02-20 r51163) This morning I reinstalled biomaRt using biocLite. Now I can no more connect to biomaRt and even the following instruction is hanging for a while until the same error message pops up.

Re: [R] after updating biomaRt cannot connect any more

2010-05-31 Thread Uwe Ligges
On 31.05.2010 17:55, Uwe Ligges wrote: On 31.05.2010 14:03, mau...@alice.it wrote: I recently updated R 2.10.1 Patched (2010-02-20 r51163) This morning I reinstalled biomaRt using biocLite. Now I can no more connect to biomaRt and even the following instruction is hanging for a while until

Re: [R] What does LOESS stand for?

2010-05-31 Thread Ted Harding
On 31-May-10 15:52:56, David Winsemius wrote: On May 31, 2010, at 11:44 AM, Peter Neuhaus wrote: Thanks a lot... ... makes it a bit difficult to explain, though... We drink no wine before its time. Somewhat like trying to explain splines to non-technical types:

[R] Problems with apply

2010-05-31 Thread Luis Felipe Parra
Hello I am tryin to use the apply functions with two data frames I've got and I am getting the following error message Error en HistRio$SecSte : $ operator is invalid for atomic vectors I don't understand why. when I use the apply I am doing: PromP - function(HistRio,AnaQuim){ xx - c(0,0,0)

Re: [R] error on Windows OS

2010-05-31 Thread M.Ribeiro
Ok, I re-installed the Rtools (now Rtools211 because I was in another computer with R version 2.10) , and the message now when I tried to install the package was Warning: invalid package 'GWSR_1.0.tar.gz' Erro: ERROR: no packages specified Warning message: In install.packages(GWSR_1.0.tar.gz,

Re: [R] [BioC] after updating biomaRt cannot connect any more

2010-05-31 Thread Heidi Dvinge
On 31 May 2010, at 13:03, mau...@alice.it mau...@alice.it wrote: I recently updated R 2.10.1 Patched (2010-02-20 r51163) This morning I reinstalled biomaRt using biocLite. Now I can no more connect to biomaRt and even the following instruction is hanging for a while until the same error

Re: [R] What does LOESS stand for?

2010-05-31 Thread Tal Galili
Hi Peter, If this article is correct: http://www.r-bloggers.com/abbreviations-of-r-commands-explained-250-r-abbreviations/ Loess stands for: [LO]cally [E]stimated [S]catterplot [S]moothing Best, Tal Contact Details:---

Re: [R] about heatmap

2010-05-31 Thread sheng zhao
Hi : try this: col=rev(your color) Regards, Sh.Z On Mon, May 31, 2010 at 2:16 PM, Jorge Ivan Velez jorgeivanve...@gmail.comwrote: Hi there, Take a look at http://www2.warwick.ac.uk/fac/sci/moac/currentstudents/peter_cock/r/heatmap/ HTH, Jorge On Mon, May 31, 2010 at 3:54 AM, 孟欣

Re: [R] error on Windows OS

2010-05-31 Thread M.Ribeiro
Thanks for all the help, So let me undestand, The Rtools is currently installed in c:\Rtools\bin; c:\Rtools\perl\bin; c:\Rtools\MinGW\bin; %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; C:\Program Files (x86)\QuickTime\QTSystem\; C:\Program Files (x86)\SAS\Shared

Re: [R] How to delete the previously saved workspace restored

2010-05-31 Thread Yanwei Tan
Thanks a lot David! I use MacOSX and deleted the .RData file, then everything is fine. Best wishes, Wei On 5/31/10 2:49 PM, David Winsemius wrote: On May 31, 2010, at 5:10 AM, Yanwei Tan wrote: Dear all, I am a new user of R, here I have a question about remove the previous restored

Re: [R] Y-axis range in histograms

2010-05-31 Thread Duncan Murdoch
On 31/05/2010 10:49 AM, Aarne Hovi wrote: Hi, I'm trying to create a histogram with R. The problem is that the frequency is high for a couple of x-axis categories (e.g. 1500) and low for most of the x-axis categories (e.g. 50) http://r.789695.n4.nabble.com/file/n2237476/LK3_hist.jpg . When I

[R] Sweave png

2010-05-31 Thread Gildas Mazo
Hi, Is there a simple way to save my figures in png instead of pdf with Sweave ?? Thanks in advance, Gidas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Problems with apply

2010-05-31 Thread Ivan Calandra
Hi, Here is what ?apply says: Returns a vector or array or list of values obtained by applying a function to margins of an array. So apply() works on arrays, not on dataframes! Maybe lapply() would do what you're looking for (don't have time to look more into it) And you don't do exactly the

Re: [R] how to extract the 1st field from a vector of strings

2010-05-31 Thread Juliet Hannah
What is the meaning of \\1 here? Thanks. desc - c(hsa-let-7a MIMAT062 Homo sapiens let-7a,hsa-let-7a* MIMAT0004481 Homo sapiens let-7a*,hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2*) I'm missing something: gsub( MIMA.*, \\1, desc) [1] hsa-let-7ahsa-let-7a* hsa-let-7a-2* gsub(

Re: [R] how to extract the 1st field from a vector of strings

2010-05-31 Thread Henrique Dallazuanna
My mistake: \\1 is a backreference - see replacement argument in ?gsub. This work: gsub((.*) MIMA.*, \\1, desc) On Mon, May 31, 2010 at 2:00 PM, Juliet Hannah juliet.han...@gmail.comwrote: What is the meaning of \\1 here? Thanks. desc - c(hsa-let-7a MIMAT062 Homo sapiens

Re: [R] error on Windows OS

2010-05-31 Thread Duncan Murdoch
On 31/05/2010 9:13 AM, M.Ribeiro wrote: Ok, I re-installed the Rtools (now Rtools211 because I was in another computer with R version 2.10) , and the message now when I tried to install the package was Warning: invalid package 'GWSR_1.0.tar.gz' Erro: ERROR: no packages specified Warning

[R] Corrections for Solaris stuff in manual

2010-05-31 Thread Dr. David Kirkby
There are a number of errors in the R manual about Solaris. http://cran.r-project.org/doc/manuals/R-admin.html#Solaris 1) Firstly, Sun are now owned by Oracle, who bought them for $7 billion. 2) (Recent Sun machines are Opterons (‘amd64’) rather than ‘x86’, but 32-bit ‘x86’ executables are

Re: [R] Problems with apply

2010-05-31 Thread Joris Meys
Ivan is -partly- right. However, in the details it says as well that : If X is not an array but has a dimension attribute, apply attempts to coerce it to an array via as.matrix if it is two-dimensional (e.g., data frames) or via as.array. The main problem is the fact that what goes into the PromP

Re: [R] store and repeat data based on row names (loop, if statement)

2010-05-31 Thread RCulloch
Hi Jim, Many thanks - that has worked perfectly, thanks so much for your help! Best wishes, Ross -- View this message in context: http://r.789695.n4.nabble.com/store-and-repeat-data-based-on-row-names-loop-if-statement-tp2236928p2237628.html Sent from the R help mailing list archive at

Re: [R] how to extract the 1st field from a vector of strings

2010-05-31 Thread Gabor Grothendieck
Try replacing a space followed by anything (.*) with the empty string: x - c(hsa-let-7a MIMAT062 Homo sapiens let-7a, + hsa-let-7a* MIMAT0004481 Homo sapiens let-7a*, + hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2*) sub( .*, , x) [1] hsa-let-7ahsa-let-7a* hsa-let-7a-2* On Thu,

Re: [R] Put two plots side by side

2010-05-31 Thread Felipe Carrillo
Two different ways: library(ggplot2) x=5 size=50 A=data.frame(X=sample(x, size, replace=T), Y=sample(x, size, replace=T),a=rep(1:2,each=25));A # Facetting qplot(X,Y,data=A) + geom_jitter(position=position_jitter(width=.03)) + facet_grid(.~a) # Or with vp p=qplot(X, Y, data=A) +

Re: [R] error on Windows OS [SEC=UNCLASSIFIED]

2010-05-31 Thread RICHARD M. HEIBERGER
M.Ribeiro, You can install on Windows from the tar.gz using the RTools. You need to set the PATH to find RTools and it looks like you skipped that step. Full details are in the R Extensions manual. Here are my notes, from several years ago as you can see by the R-2.8.0 paths and the Rtools29.exe

[R] Fancy Page layout

2010-05-31 Thread Noah Silverman
Hi, Working on a report that is going to have a large number of graphs and summaries. We have 80 groups with 20 variables each. Ideally, I'd like to produce ONE page for each group. It would have two columns of 10 graphs and then the 5 number summary of the variables at the bottom. So, perhaps

Re: [R] Fancy Page layout

2010-05-31 Thread RICHARD M. HEIBERGER
Use lattice. require(lattice) ?lattice ?xyplot [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] How to skip negative values when calculating average

2010-05-31 Thread ecvetano
I have a data frame 10 by 12 with positive and negative numbers. I want to select only the positive numbers and find the average. This calculates the average of everything: av5 - subset(ER9r, Day == 253, select = c (Depth1j:Depth0.75j) av5 - mean(av5) I need something along the lines of

Re: [R] Fancy Page layout

2010-05-31 Thread baptiste auguie
Hi, ggplot2 or lattice could help you in creating the plots. Adding a summary will however require some play with Grid graphics; either using gridBase to mix lattice / ggplot2 output with base R graphics (e.g. textplot() from some package I forget), or you'll need to produce the textual summary

Re: [R] How to skip negative values when calculating average

2010-05-31 Thread David Winsemius
On May 31, 2010, at 2:06 PM, ecvet...@uwaterloo.ca wrote: I have a data frame 10 by 12 with positive and negative numbers. I want to select only the positive numbers and find the average. This calculates the average of everything: av5 - subset(ER9r, Day == 253, select = c

Re: [R] Fancy Page layout

2010-05-31 Thread Noah Silverman
Lattice looks nice, but how can I put some summary text at the bottom? On 5/31/10 11:27 AM, RICHARD M. HEIBERGER wrote: Use lattice. require(lattice) ?lattice ?xyplot __ R-help@r-project.org mailing list

Re: [R] Can not save plot to png file correctly

2010-05-31 Thread Felipe Carrillo
You can save as png like this too: library(ggplot2) data=data.frame(   X=sample(10,1000,replace=T)   , Y=letters[1:10]) png(mypng.png) qplot(X, data=data, geom='histogram') + facet_wrap( ~ Y) dev.off()   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife

Re: [R] geom_ribbon removes missing values

2010-05-31 Thread Hadley Wickham
Hi Karsten, There's no easy way to do this because behind the scenes geom_ribbon uses grid.polygon. Hadley On Sun, May 30, 2010 at 7:26 AM, Karsten Loesing karsten.loes...@gmx.net wrote: Hi everyone, it looks like geom_ribbon removes missing values and plots a single ribbon over the whole

[R] Can not save plot to png file correctly

2010-05-31 Thread Felipe Carrillo
With ggsave the graph windows pops up but using: png(mypng.png) qplot(X, data=data, geom='histogram') + facet_wrap( ~ Y) dev.off() The graph is saved in the background Is there a way to hide the graph window when using ggsave? You can save as png like this too: library(ggplot2) data=data.frame(  

Re: [R] solve_TSP ignores control data, or I'm reading the help doc incorrectly.

2010-05-31 Thread Michael Hahsler
the correct way to do it is solve_TSP(tsp, 2-opt, control=list(rep=56)) -Michael -- Dr. Michael Hahsler, Visiting Assistant Professor Department of Computer Science and Engineering Lyle School of Engineering Southern Methodist University, Dallas, Texas (214) 768-8878 *

Re: [R] [BioC] after updating biomaRt cannot connect any more

2010-05-31 Thread Sean Davis
On Mon, May 31, 2010 at 8:03 AM, mau...@alice.it wrote: I recently updated R 2.10.1 Patched (2010-02-20 r51163) This morning I reinstalled biomaRt using biocLite. Now I can no more connect to biomaRt and even the following instruction is hanging for a while until the same error message

[R] correcting a few data in a large data frame

2010-05-31 Thread Mr. Natural
The data frame is lwf that records the survival of bushes over an 8 year period. Years are called bouts. Dead bushes are recorded as zeros, and live bushes as 1. str(lwf) 'data.frame': 638 obs. of 9 variables: $ bushno: int 1 2 3 4 5 6 7 8 9 10 ... $ bout1 : int 0 1 0 1 1 1 0 1 0 1 ... $

Re: [R] geepack installation problem?

2010-05-31 Thread Denis B
Dear Peter, Sincere thanks. Problem solved! Kind regards, Denis -- View this message in context: http://r.789695.n4.nabble.com/geepack-installation-problem-tp2236893p2237868.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] correcting a few data in a large data frame

2010-05-31 Thread David Winsemius
On May 31, 2010, at 5:29 PM, Mr. Natural wrote: The data frame is lwf that records the survival of bushes over an 8 year period. Years are called bouts. Dead bushes are recorded as zeros, and live bushes as 1. str(lwf) 'data.frame': 638 obs. of 9 variables: $ bushno: int 1 2 3 4 5 6

Re: [R] correcting a few data in a large data frame

2010-05-31 Thread Dennis Murphy
Hi: A simple diagnostic is to check how many distinct run lengths exist in a row - ideally, it should be one or two. If it's more than two, something is amiss. Hence, define f() as a function to determine the number of distinct runs in a given row and call the apply() function with it: f -

  1   2   >