Re: [R] Plotting by Group

2010-10-13 Thread Dieter Menne
Ado wrote: > > > My data: > > XYSpecies Group > 0 0A1 > .. A1 > .. A1 > I want to plot X vs Y for each species onto the

Re: [R] Drop matching lines from readLines

2010-10-13 Thread Santosh Srinivas
I guess "invert" does the trick. For recording ... example .. file <- grep("Repurchase Price",file, fixed = TRUE, invert = TRUE) -Original Message- From: Santosh Srinivas [mailto:santosh.srini...@gmail.com] Sent: 14 October 2010 11:28 To: 'r-help' Subject: Drop matching lines from readL

[R] Drop matching lines from readLines

2010-10-13 Thread Santosh Srinivas
Dear R-group, I have some noise in my text file (coding issues!) ... I imported a 200 MB text file using readlines Used grep to find the lines with the error? What is the easiest way to drop those lines? I plan to write back the "cleaned" data set to my base file. Thanks. _

[R] The width argument of stem()

2010-10-13 Thread Marcin Kozak
Dear all, The help page of stem() says that the width argument gives the desired width of plot. However, I cannot come up with any idea what this width stays for. This becomes especially difficult if you run these couple of examples: The decimal point is 3 digit(s) to the right of the | 0 | 0

[R] several car scatterplots on one graph

2010-10-13 Thread cryan
R version 2.11.1 on WinXP How do I get 3 scatterplots with marginal boxplots (from the car package) onto a single plot? I have a data frame called bank > dim(bank) [1] 46 5 head(bank) x1x2 x3 x4 pop 1 -0.45 -0.41 1.09 0.45 0 2 -0.56 -0.31 1.51 0.16 0 3 0.06 0.02 1.01 0.40

[R] Plotting by Group

2010-10-13 Thread Adrian Hordyk
Hi all, My apologies if this is a very simple problem. I am very new to R, having worked a lot previously with Excel. I recently completed a R course with John Hoenig which introduced me to R. My data: XYSpecies Group 0 0A

Re: [R] Basic data question

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 11:52 PM, Santosh Srinivas wrote: I have a question about the output given below after running few lines of code. Surely a 101 query! MF_Data <- read.csv("MF_Data_F.txt", header = F, sep="|") temp <- head(MF_Data) #Get the sample Data temp1 <- subset(temp, select= c(V1,V

[R] Basic data question

2010-10-13 Thread Santosh Srinivas
I have a question about the output given below after running few lines of code. Surely a 101 query! MF_Data <- read.csv("MF_Data_F.txt", header = F, sep="|") temp <- head(MF_Data) #Get the sample Data temp1 <- subset(temp, select= c(V1,V4,V6)) #where V1, V4, V6 are the col names .. to Get the rel

Re: [R] Loop in columns by group

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 5:20 PM, Julia Lira wrote: Dear all, I need to do a loop as following: #Consider a matrix: M <- matrix(1, nrow=10, ncol=20) #Matrices to store the looping results M1 <- matrix(0, nrow=10, ncol=400) h <- c(1:20/1000) #loop # (I've seen more informative comments) for (j i

Re: [R] nnet help

2010-10-13 Thread Raji
Hi R-helpers , can you please give me more insights on the other data mining and predictive techniques that the nnet package can be used for? -- View this message in context: http://r.789695.n4.nabble.com/nnet-help-tp2993609p2994756.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Matrix subscripting to wrap around from end to start of row

2010-10-13 Thread Dennis Murphy
Hi: This isn't particularly elegant, but I think it works: # The function to be applied: f <- function(x, idx) { n <- length(x) if(idx[1] < idx[2]) {idx <- seq(idx[1], idx[2]) } else { idx <- c(seq(idx[1], n), seq(1, idx[2])) } mean(x[idx]) } # tests > month.data = matrix(c(3,

Re: [R] compare histograms

2010-10-13 Thread Michael Bedward
Hi Juan, Yes, you can use EMD to quantify the difference between any pair of histograms regardless of their shape. The only constraint, at least the way that I've done it previously, is to have compatible bins. The original application of EMD was to compare images based on colour histograms which

Re: [R] Poisson Regression

2010-10-13 Thread Charles C. Berry
On Wed, 13 Oct 2010, David Winsemius wrote: On Oct 13, 2010, at 4:50 PM, Antonio Paredes wrote: Hello everyone, I wanted to ask if there is an R-package to fit the following Poisson regression model log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k} i=1,\cdots,N (subjects) j=0,1 (two le

Re: [R] Poisson Regression

2010-10-13 Thread Bill.Venables
One possible way to treat parameters as "nuisance parameters" is to model them as random. This gives allows them to have a reduced parametric load. There are many packages with funcitons to fit glmms. One you may wish to look at is lme4, which has the lmer fitting function library(lme4) fm

Re: [R] repeating an analysis

2010-10-13 Thread Andrew Halford
thanks Phil, I have your solution and another which I will attempt in the next day or so and will post results to the list then. cheers andy On Wed, Oct 13, 2010 at 10:30 AM, Phil Spector wrote: > Andrew - > I think > > answer = replicate(50,{fit1 <- rpart(CHAB~.,data=chabun, method="anova",

Re: [R] Poisson Regression

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 4:50 PM, Antonio Paredes wrote: Hello everyone, I wanted to ask if there is an R-package to fit the following Poisson regression model log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k} i=1,\cdots,N (subjects) j=0,1 (two levels) k=0,1 (two levels) treating the \phi_{i

Re: [R] merging and working with BIG data sets. Is sqldf the best way??

2010-10-13 Thread Gabor Grothendieck
On Tue, Oct 12, 2010 at 2:39 AM, Chris Howden wrote: > I’m working with some very big datasets (each dataset has 11 million rows > and 2 columns). My first step is to merge all my individual data sets > together (I have about 20) > > I’m using the following command from sqldf > >               dat

Re: [R] drilling down data on charts

2010-10-13 Thread sachinthaka . abeywardana
Just to clarify I meant opening it in a new window (and perhaps closing old frame?). Thanks again, Sachin Sachinthaka Abeywardana/HO/Al

[R] drilling down data on charts

2010-10-13 Thread sachinthaka . abeywardana
Hey all, Suppose a=b^2 for starters. I want to be able to create a graph that displays a initially and if i was to click on 'a' to show 'b' on the chart itself. Does anyone know if this is possible in R? Also as an extension (not necessary as yet) to output the above into a 'html' file. Thanks,

[R] type II & III test for mixed model

2010-10-13 Thread array chip
Hi, is there a package for getting type II or type III tests on mixed models (lme or lmer), just like what Anova() in car package does for aov, lm, etc.? Thanks John [[alternative HTML version deleted]] __ R-help@r-project.org mailin

[R] Loop in columns by group

2010-10-13 Thread Julia Lira
Dear all, I need to do a loop as following: #Consider a matrix: M <- matrix(1, nrow=10, ncol=20) #Matrices to store the looping results M1 <- matrix(0, nrow=10, ncol=400) h <- c(1:20/1000) #loop for (j in h){ M1 <- M/(2*j) } But this means that the first 20 columns of matrix M

Re: [R] Matrix subscripting to wrap around from end to start of row

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 4:54 PM, Alisa Wade wrote: Thanks, David for the response. Unfortunately, that only works for the case where I happen to only want the last and first month "wrap". But it doesn't work for any other case, e.g., say I want months start.month = 4, end.month = 2. Now woul

Re: [R] adding a named column to a Matrix

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 4:44 PM, Alison Callahan wrote: Hello all, I am trying to use cbind to add a named empty column to a Matrix: outputmatrix <- cbind(outputmatrix,kog_id = seq(0,0,0)) Not sure off the top of my head what the right way might be, but this should work: names(outputmatrix)

Re: [R] adding a named column to a Matrix

2010-10-13 Thread Henrique Dallazuanna
Try this: `colnames<-`(cbind(m, kog_id = 0), c(colnames(m), kog_id)) On Wed, Oct 13, 2010 at 5:44 PM, Alison Callahan wrote: > Hello all, > > I am trying to use cbind to add a named empty column to a Matrix: > > outputmatrix <- cbind(outputmatrix,kog_id = seq(0,0,0)) > > The problem I have is t

Re: [R] Matrix subscripting to wrap around from end to start of row

2010-10-13 Thread Alisa Wade
Thanks, David for the response. Unfortunately, that only works for the case where I happen to only want the last and first month "wrap". But it doesn't work for any other case, e.g., say I want months start.month = 4, end.month = 2. Now start=4; end=2; year.avg = apply(month.data[, c(start,end)],

[R] Poisson Regression

2010-10-13 Thread Antonio Paredes
Hello everyone, I wanted to ask if there is an R-package to fit the following Poisson regression model log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k} i=1,\cdots,N (subjects) j=0,1 (two levels) k=0,1 (two levels) treating the \phi_{i} as nuinsance parameters. Thank you very much -- -Ton

[R] adding a named column to a Matrix

2010-10-13 Thread Alison Callahan
Hello all, I am trying to use cbind to add a named empty column to a Matrix: outputmatrix <- cbind(outputmatrix,kog_id = seq(0,0,0)) The problem I have is that kog_id is a variable that has a value e.g. "KOG1234", but I when I try to use this to name the added column, it is named literally "kog_

Re: [R] vectorizing: selecting one record per group

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 4:17 PM, Erik Iverson wrote: Hello, There are probably many ways to do this, but I think it's easier if you use a data.frame as your object. The easy solution for the matrix you provide is escaping me at the moment. Perhaps using sampling to derive an index? A[ tapply(1

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Schwab,Wilhelm K
I know *what* happened (Calc reformatted the data in ways I did not want or expect). It is not end-of-line conventions; they reformatted the data leaving the structure intact. As to why/how, that could depend on the sequence of operations, so I thought to ask here to see if you had collective

Re: [R] Matrix subscripting to wrap around from end to start of row

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 4:10 PM, Alisa Wade wrote: Perhaps it is just that I don't even know the correct term to search for, but I can find nothing that explains how to wrap around from the end to a start of a row in a matrix. For example, you have a matrix of 2 years of data, where rows are

Re: [R] strip month and year from MM/DD/YYYY format

2010-10-13 Thread Gabor Grothendieck
On Wed, Oct 13, 2010 at 10:49 AM, wrote: > Greetings >    I'm having difficulty witht the strptime function.  I can't seem to > figure a way to strip month (name) and year and create separate columns > from a column with MM/DD/ formatted dates.  Can anyone help? Try month.day.year in chron:

Re: [R] vectorizing: selecting one record per group

2010-10-13 Thread Henrique Dallazuanna
Try this: A <- data.frame(V1 = rnorm(100), V2 = runif(100), V3 = rep(c(1,2,3,4,5),20)) do.call(cbind, lapply(aggregate(. ~ V3, A, FUN = sample, size = 5), c)) On Wed, Oct 13, 2010 at 5:01 PM, Mauricio Romero < mauricio.rom...@quantil.com.co> wrote: > Hi, > > > > I want to select a subsample from

Re: [R] Coin Toss Simulation

2010-10-13 Thread Shiv
Erik- thank you very much. The rbinom worked. Thanks ! GR From: Erik Iverson-3 [via R] Sent: Wed, October 13, 2010 2:24:18 PM Subject: Re: Coin Toss Simulation Shiv wrote: > I am trying a simple toin coss simulation, of say 200 coin tosses. The idea

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Mike Marchywka
> From: dwinsem...@comcast.net > To: bsch...@anest.ufl.edu > Date: Wed, 13 Oct 2010 14:52:21 -0400 > CC: r-help@r-project.org > Subject: Re: [R] [OT] (slightly) - OpenOffice Calc and text files > > > On Oct 13, 2010, at 1:13 PM, Schwab,Wilhelm K wrote: >

Re: [R] vectorizing: selecting one record per group

2010-10-13 Thread Erik Iverson
Hello, There are probably many ways to do this, but I think it's easier if you use a data.frame as your object. The easy solution for the matrix you provide is escaping me at the moment. One solution, using the plyr package: library(plyr) A <- data.frame(a = rnorm(100),b = runif(100), c = rep

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Gabor Grothendieck
On Wed, Oct 13, 2010 at 2:16 PM, Bart Joosen wrote: > > Hi, > > this should be an easy one, but I can't figure it out. > I have a vector of tests, with their units between brackets (if they have > units). > eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") > strapply in gsubfn

[R] Matrix subscripting to wrap around from end to start of row

2010-10-13 Thread Alisa Wade
Perhaps it is just that I don't even know the correct term to search for, but I can find nothing that explains how to wrap around from the end to a start of a row in a matrix. For example, you have a matrix of 2 years of data, where rows are years, and columns are months. month.data = matrix(c(3,4

Re: [R] Change global env variables from within a function

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 2:19 PM, Jon Zadra wrote: Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual

[R] vectorizing: selecting one record per group

2010-10-13 Thread Mauricio Romero
Hi, I want to select a subsample from my data, choosing one record from each group. I know how to do this with a for. For example: lets say I have the data: A=cbind(rnorm(100),runif(100),(rep(c(1,2,3,4,5),20))) Where the third column is the group variable. Then what I want is to select 5

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Charles C. Berry
On Wed, 13 Oct 2010, Schwab,Wilhelm K wrote: It will get a good look, as will gnumeric - thanks to all! emacs org-mode can convert your tab delimited file to a 'table' that you can edit either using org-mode functions OR as plain text by switching to fundamental mode. In emacs speak, just

Re: [R] loop

2010-10-13 Thread Phil Spector
Julia - Your subscript is out of range because in this loop: for (t in aeven2){ Mhb0[,t] <- M[,(41+t)]-M[,(41-t)] Mhb1[,t] <- M[,(42+t)]-M[,(42-t)] } t takes the values from 2 to 40 by 2, and you've declared Mhb0 and Mhb1 as matrices with 20 columns. So when t reach

Re: [R] Change global env variables from within a function

2010-10-13 Thread Greg Snow
R is primarily a function language not a macro language and what you are trying to do matches more with macro programming. The best approach is to think functionally and learn the more Rish ways of doing things (have the function return the changed data and the caller does the replacement, like

Re: [R] loop

2010-10-13 Thread Julia Lira
Dear Eriki and all To run Quantile regression, it is necessary to install the following package in R: install.packages("quantreg") Then, write: library(quantreg) And the software will run. rm(list=ls()) #remove almost everything in the memory set.seed(180185) nsim <- 10 m

Re: [R] Nonlinear Regression Parameter Shared Across Multiple Data Sets

2010-10-13 Thread Jared Blashka
As an addendum to my question, I'm attempting to apply the solution to the robust non-linear regression function nlrob from the robustbase package, and it doesn't work in that situation. I'm getting allRobustFit <- nlrob(Y ~ (upper)/(1+10^(X-LOGEC50[dset])), data=all ,start=list(upper=max(all$Y),L

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Matt Shotwell
Here's a shorter (but more cryptic) one: > gsub("^([^\\(]+)(\\((.+)\\))?", "\\2", tests) [1] """(%)" "(%)" "(mg/ml)" > gsub("^([^\\(]+)(\\((.+)\\))?", "\\3", tests) [1] "" "%" "%" "mg/ml" -Matt On Wed, 2010-10-13 at 14:34 -0400, Henrique Dallazuanna wrote: > Try th

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Bert Gunter
Note: My original proposal, not quite right, can be made quite right via: gsub(".*\\((.*)\\).*||[^()]+", "\\1",tests) The "||" or clause at the end handles the case where there are no parentheses in the string. -- Bert On Wed, Oct 13, 2010 at 11:16 AM, Bart Joosen wrote: > > Hi, > > this shou

Re: [R] loop

2010-10-13 Thread Erik Iverson
Julia, Can you provide a reproducible example? Your code calls the 'rq' function which is not found on my system. Any paring down of the code to make it more readable would help us help you better, too. Julia Lira wrote: Dear all, I am trying to run a loop in my codes, but the software r

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 1:13 PM, Schwab,Wilhelm K wrote: Hello all, I had a very strange looking problem that turned out to be due to unexpected (by me at least) format changes to one of my data files. We have a small lab study in which each run is represented by a row in a tab-delimited fi

Re: [R] Change global env variables from within a function

2010-10-13 Thread Erik Iverson
Hello, Jon Zadra wrote: Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual column names in a data fr

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Bert Gunter
One way: gsub(".*\\(([^()]*)\\).*", "\\1",tests) Idea: Pick out the units designation between the "()" and replace the whole expression with it. The "\\1" refers to the "[^()]* parenthesized expression in the middle that picks out the units. Cheers, Bert On Wed, Oct 13, 2010 at 11:16 AM, Bart

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Erik Iverson
Bart, I'm hardly one of the lists regex gurus: but this can get you started... tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") x <- regexpr("\\((.*)\\)", tests) substr(tests, x + 1, x + attr(x, "match.length") - 2) Bart Joosen wrote: Hi, this should be an easy one, but I c

[R] loop

2010-10-13 Thread Julia Lira
Dear all, I have just sent an email with my problem, but I think no one can see the red part, beacuse it is black. So, i am writing again the codes: rm(list=ls()) #remove almost everything in the memory set.seed(180185) nsim <- 10 mresultx <- matrix(-99, nrow=1000, ncol=nsim) mresultb <- ma

Re: [R] "Memory not mapped" when using .C, problem in Mac but not in Linux

2010-10-13 Thread Berend Hasselman
- which version of Mac OS X? - Which version of R? (version, architecture) - Officially provided R or compiled by you? Official R is compiled with Apple gcc. - if R was compiled with Apple compiler, who knows what can happen if you link with code compiled with a non Apple gcc? - if the code runs o

[R] (no subject)

2010-10-13 Thread Julia Lira
Dear all, I have just sent an email with my problem, but I think no one can see the red part, beacuse it is black. So, i am writing again the codes: rm(list=ls()) #remove almost everything in the memory set.seed(180185) nsim <- 10 mresultx <- matrix(-99, nrow=1000, ncol=nsim) mresultb <-

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Henrique Dallazuanna
Try this: replace(gsub(".*\\((.*)\\)$", "\\1", tests), !grepl("\\(.*\\)", tests), "") On Wed, Oct 13, 2010 at 3:16 PM, Bart Joosen wrote: > > Hi, > > this should be an easy one, but I can't figure it out. > I have a vector of tests, with their units between brackets (if they have > units). > e

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Schwab,Wilhelm K
It will get a good look, as will gnumeric - thanks to all! Bill From: Albyn Jones [jo...@reed.edu] Sent: Wednesday, October 13, 2010 2:14 PM To: Schwab,Wilhelm K Subject: Re: [R] [OT] (slightly) - OpenOffice Calc and text files emacs shows you exactly w

Re: [R] "Memory not mapped" when using .C, problem in Mac but not in Linux

2010-10-13 Thread William Dunlap
I don't know much about the iMac. R's .C() passes R-language integers as pointers to 32-bit ints. If your iMac is 64-bit and sizeof(long)==8 in your compiler (pretty common for 64-bit compilers but not so for Microsoft Windows compilers) then Long[0] will use the next 64 bits to make an integral

Re: [R] Change global env variables from within a function

2010-10-13 Thread Duncan Murdoch
On 13/10/2010 2:19 PM, Jon Zadra wrote: Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual column name

Re: [R] Coin Toss Simulation

2010-10-13 Thread Erik Iverson
Shiv wrote: I am trying a simple toin coss simulation, of say 200 coin tosses. The idea is to have a data frame like so: Experiment#Number_Of_Heads 1 104 296 3101 So I do: d <-data.frame(exp_num=c(1,2,3)); /* J

[R] Change global env variables from within a function

2010-10-13 Thread Jon Zadra
Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual column names in a data frame, I ran into the follow

Re: [R] Coin Toss Simulation

2010-10-13 Thread Dimitris Rizopoulos
try this: n <- 3 data.frame(Exp = seq_len(n), Heads = rbinom(n, 200, 0.5)) I hope it helps. Best, Dimitris On 10/13/2010 7:28 PM, Shiv wrote: I am trying a simple toin coss simulation, of say 200 coin tosses. The idea is to have a data frame like so: Experiment#Number_Of_Heads

[R] Regular expression to find value between brackets

2010-10-13 Thread Bart Joosen
Hi, this should be an easy one, but I can't figure it out. I have a vector of tests, with their units between brackets (if they have units). eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") Now I would like to hava a function where I use a test as input, and which returns the

[R] loop

2010-10-13 Thread Julia Lira
Dear all, I am trying to run a loop in my codes, but the software returns an error: "subscript out of bounds" I dont understand exactly why this is happenning. My codes are the following: rm(list=ls()) #remove almost everything in the memory set.seed(180185) nsim <- 10 mresultx <- ma

Re: [R] "Memory not mapped" when using .C, problem in Mac but not in Linux

2010-10-13 Thread David
Thank you very much for your kind reply. I used gdb, and it returns a reason "KERN_INVALID_ADDRESS" on a very simple operation (obtaining the time step for a numerical integration). Please see bellow. But, um, I solved it by changing the function's arguments in the C code from "unsigned long int"

[R] Coin Toss Simulation

2010-10-13 Thread Shiv
I am trying a simple toin coss simulation, of say 200 coin tosses. The idea is to have a data frame like so: Experiment#Number_Of_Heads 1 104 296 3101 So I do: d <-data.frame(exp_num=c(1,2,3)); /* Just 3 experimen

Re: [R] Pipeline pilot fingerprint package

2010-10-13 Thread Eric Hu
Hi Rajarshi, Here is a post I found from Pipeline pilot community help pages: https://community.accelrys.com/message/3466 Eric -Original Message- From: Rajarshi Guha [mailto:rajarshi.g...@gmail.com] Sent: Wednesday, October 13, 2010 7:52 AM To: Eric Hu Cc: r-help@r-project.org Subject

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Schwab,Wilhelm K
Peter, vi is *really* primitive =:0 R is a little late because I tend to do shape changes prior to invoking R. However, I could load tweak and re-save and then bring R back into it later. I never would have thought of it. Thanks! Bill From: Peter

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Schwab,Wilhelm K
Albyn, I'll look into it. In fact, I have a small book on it that I bought in my very early days of using Linux. I quickly found TeX Maker (for the obvious), Code::Blocks for C/C++ and I would not have started the move without a working Smalltalk (http://pharo-project.org/home). For editing

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Joshua Wiley
On Wed, Oct 13, 2010 at 10:13 AM, Schwab,Wilhelm K wrote: > Hello all, > > I had a very strange looking problem that turned out to be due to unexpected > (by me at least) format changes to one of my data files.  We have a small lab > study in which each run is represented by a row in a tab-delim

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Marc Schwartz
On Oct 13, 2010, at 12:13 PM, Schwab,Wilhelm K wrote: > Hello all, > > I had a very strange looking problem that turned out to be due to unexpected > (by me at least) format changes to one of my data files. We have a small lab > study in which each run is represented by a row in a tab-delimite

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Peter Langfelder
On Wed, Oct 13, 2010 at 10:13 AM, Schwab,Wilhelm K wrote: > Hello all, > > I had a very strange looking problem that turned out to be due to unexpected > (by me at least) format changes to one of my data files.  We have a small lab > study in which each run is represented by a row in a tab-delim

Re: [R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Albyn Jones
How about emacs? albyn On Wed, Oct 13, 2010 at 01:13:03PM -0400, Schwab,Wilhelm K wrote: > Hello all, > <.> > Have any of you found a nice (or at least predictable) way to use OO Calc to > edit files like this? If it insists on thinking for me, I wish it would > think in 24 hour time and 4

Re: [R] bootstrap in pROC package

2010-10-13 Thread Łukasz Ręcławowicz
Try: ci.auc(all$D,all$pre,m="b") 2010/10/13 zhu yao : > Dear useRs: > > I use pROC package to compute the bootstrap C.I. of AUC. > > The command was as follows: > > roc1<-roc(all$D,all$pre,ci=TRUE,boot.n=200) -- Miłego dnia __ R-help@r-project.org ma

Re: [R] Read Particular Cells within Excel

2010-10-13 Thread Henrique Dallazuanna
Try this: library(RDCOMClient) xl <- COMCreate("Excel.Application") wk <- xl$Workbooks()$Open("Book1.xlsx") do.call(cbind, wk$Sheets(1)$Range("B50:C55")$Value()) On Tue, Oct 12, 2010 at 9:17 PM, Jeevan Duggempudi wrote: > Hello all, > > I have a business user who generates monthly reports in M

[R] [OT] (slightly) - OpenOffice Calc and text files

2010-10-13 Thread Schwab,Wilhelm K
Hello all, I had a very strange looking problem that turned out to be due to unexpected (by me at least) format changes to one of my data files. We have a small lab study in which each run is represented by a row in a tab-delimited file; each row identifies a repetition of the experiment and a

Re: [R] Extracting index in character array.

2010-10-13 Thread Christian Raschke
> which(list=="C") [1] 3 See ?which On 10/13/2010 11:56 AM, lord12 wrote: If I have a character array: list = c("A", "B", "C") how do I access the third element without doing list[3]. Can't I find the index of "C" using a particular function? -- Christian Raschke Department of Econom

[R] Extracting index in character array.

2010-10-13 Thread lord12
If I have a character array: list = c("A", "B", "C") how do I access the third element without doing list[3]. Can't I find the index of "C" using a particular function? -- View this message in context: http://r.789695.n4.nabble.com/Extracting-index-in-character-array-tp2994029p2994029.html Se

Re: [R] "Memory not mapped" when using .C, problem in Mac but not in Linux

2010-10-13 Thread William Dunlap
This often happens when your C code uses memory that it did not allocate, particularly when it reads or writes just a little beyond the end of a memory block. On some platforms or if you are lucky there is unused memory between blocks of allocated memory and you don't see a problem. Other machines

Re: [R] Pasting function arguments and strings

2010-10-13 Thread William Dunlap
Is this the sort of thing you are looking for? > f <- function(testName, dataset, ...) { + testFunc <- match.fun(paste(testName, "_test", sep="")) + testFunc(dataset, ...) + } > m_test <- function(x) "the m test" > p_test <- function(x) "the p test" > f("m", 17) [1] "the m

Re: [R] Pasting function arguments and strings

2010-10-13 Thread Peter Langfelder
>From what I read, you want something like this: myfunction<-function(dataset,arg1,arg2) { func = match.fun(arg2) argument = dataset[, match(paste(arg1,"_test", sep=""), names(dataset))] result=func(argument) return(result) } On Wed, Oct 13, 2010 at 9:28 AM, Manta wrote: > > Thaks for your q

Re: [R] Plotting Y axis labels within a loop

2010-10-13 Thread Steve Swope
Got it , thanks! From: David Winsemius [via R] [mailto:ml-node+2992845-2070125287-199...@n4.nabble.com] Sent: Tuesday, October 12, 2010 3:28 PM To: Steve Swope Subject: Re: Plotting Y axis labels within a loop On Oct 12, 2010, at 5:54 PM, Steve Swope wrote: > > When I plot y axis lab

Re: [R] Pasting function arguments and strings

2010-10-13 Thread Manta
Thaks for your quick reply Bert, although I doubt it works. The reason is that the names of the objects of the dataset, all end with the sufix '_test' and therefore I need to attach/paste/glue this suffix to the 'arg2' of the function. Any other idea? -- View this message in context: http://r.7

Re: [R] Pasting function arguments and strings

2010-10-13 Thread Bert Gunter
If I understand you correctly, just arg2(arg1) will work fine...One of the nice features of R. Example: f <- function(dat,fun=mean,...) { fun(dat, ...) ## ... allows extra arguments to fun } f( rnorm(10), trim=.05) ## trimmed mean x <- 1:10 f(x, fun = max,na.rm=TRUE) Cheers, Bert On Wed,

Re: [R] overlaying multiple contour plots

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 11:44 AM, Jeremy Olson wrote: Dear All, I have 4 or 5 contour plots that I need to overlay. Currently they are maps showing hot and cold areas for specific elements. Providing paste-able examples is the standard way to present such problems. I would like to combine

Re: [R] Plot table as table

2010-10-13 Thread Greg Snow
Also look at textplot in the gplots package and addtable2plot in the plotrix package. -- 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 [mailto:r-help-boun...@r- >

[R] Pasting function arguments and strings

2010-10-13 Thread Manta
Dear R community, I am struggling a bit with a probably fairly simple task. I need to use some already existing functions as argument for a new function that I am going to create. 'dataset' is an argument, and it comprises objects named 'mean_test', 'sd_test', 'kurt_test' and so on. 'arg1' tells

Re: [R] Read Particular Cells within Excel

2010-10-13 Thread Greg Snow
I don't know of any tools that would do this generally (RODBC could do it if there were specific column names in the 1st row and a given column with information to identify the rows, but this seems unlikely from your description). A couple of possibilities: In Excel you can highlight the colum

[R] overlaying multiple contour plots

2010-10-13 Thread Jeremy Olson
Dear All, I have 4 or 5 contour plots that I need to overlay. Currently they are maps showing hot and cold areas for specific elements. I would like to combine these plots into one map, where each color will correspond to a different element and you would be able to see the areas that each elem

Re: [R] extract rows of a matrix

2010-10-13 Thread Greg Snow
> newmat <- oldmat[ c(rep(FALSE,19),TRUE), ] Or > newmat <- oldmat[ seq(20, nrow(oldmat), 20), ] -- 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 [mailto:r-help-b

[R] interaction contrasts

2010-10-13 Thread Kay Cichini
hello list, i'd very much appreciate help with setting up the contrast for a 2-factorial crossed design. here is a toy example: library(multcomp) dat<-data.frame(fac1=gl(4,8,labels=LETTERS[1:4]), fac2=rep(c("I","II"),16),y=rnorm(32,1,1)) mod<-lm(y~fac1*fac2,data=dat) ## the

Re: [R] bwplot change whiskers position to percentile 5 and P95

2010-10-13 Thread David Winsemius
On Oct 13, 2010, at 10:05 AM, Christophe Bouffioux wrote: Dear R-community, Using bwplot, how can I put the whiskers at percentile 5 and percentile 95, in place of the default position coef=1.5?? Using panel=panel.bwstrip, whiskerpos=0.05, from the package agsemisc gives satisfaction, bu

Re: [R] R: robust standard errors for panel data

2010-10-13 Thread max . e . brown
Thanks Giovanni and Achim! I will try out some of the things you suggested. Let's see how far I get :-) __ 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-

Re: [R] Pipeline pilot fingerprint package

2010-10-13 Thread Rajarshi Guha
On Tue, Oct 12, 2010 at 8:54 PM, Eric Hu wrote: > Hi, > > I am trying to see if I can use R to perform more rigorous regression > analysis. I wonder if the fingerprint package is able to handle pipeline > pilot fingerprints (ECFC6 etc) now. Currently no - does Pipeline Pilot out put their ECFP's

[R] strip month and year from MM/DD/YYYY format

2010-10-13 Thread Kurt_Helf
Greetings I'm having difficulty witht the strptime function. I can't seem to figure a way to strip month (name) and year and create separate columns from a column with MM/DD/ formatted dates. Can anyone help? Cheers Kurt *** Kur

Re: [R] NA with lmList

2010-10-13 Thread Phil Spector
Please take a look at the documentation for lmList regarding the na.action= argument. It should be a *function*, not TRUE or FALSE. For example, try lmList(score ~ childid | spring, data=a, na.action=na.omit) - Phil Spector

[R] NA with lmList

2010-10-13 Thread FMH
Dear All,   I was trying to use the lmList function to get the lmList graphic but  have a problem creating the graphic.  My data has missing values and an error occurred  as stated below. ### library(nlme) > a   schoolid spring score childi

[R] bwplot change whiskers position to percentile 5 and P95

2010-10-13 Thread Christophe Bouffioux
Dear R-community, Using bwplot, how can I put the whiskers at percentile 5 and percentile 95, in place of the default position coef=1.5?? Using panel=panel.bwstrip, whiskerpos=0.05, from the package agsemisc gives satisfaction, but changes the appearance of my boxplot and works with an old versio

Re: [R] Data Gaps

2010-10-13 Thread Dennis Murphy
Hi: On Wed, Oct 13, 2010 at 5:31 AM, dpender wrote: > > Dennis, > > Thanks for that. The problem now is that I am trying to use it in a for > loop. Based on the example before, 2 entries are required after H[3] as > specified by O. The problem is that when inserting values the length of > the

[R] R: robust standard errors for panel data

2010-10-13 Thread Millo Giovanni
Hello. In principle Achim is right, by default vcovHC.plm does things the "Arellano" way, clustering by group and therefore giving SEs which are robust to general heteroskedasticity and serial correlation. The problem with your data, though, is that this estimator is N-consistent, so it is inapp

[R] "Memory not mapped" when using .C, problem in Mac but not in Linux

2010-10-13 Thread David
Hello, I am aware this may be an obscure problem difficult to advice about, but just in case... I am calling a C function from R on an iMac (almost shining: bought by my institution this year) and gives a "memory not mapped" error. Nevertheless, exactly the same code runs without problem in a pow

  1   2   >