[R] Odp: Fwd: data format

2007-10-30 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 30.10.2007 21:49:37: > Excuse me for less detailed e-mail I've sent before, I guess there's a > misunderstanding here. And still is. You even did not show us how are your data stored in R. > My problem is to use the data in the order I've typed below without > sp

Re: [R] Difficulty Compiling RSQLite on Solaris x86 Using Studio 12 Compilers

2007-10-30 Thread Prof Brian Ripley
This isn't really an appropriate forum, and the problem seems to be related to how you built R (why is dmake being used?) I've just tried RSQLite on our x86_64 Solaris 10 box (as far as I know SunOS 5.11 is not yet released but a preview), and it worked out of the box. You need help from someo

Re: [R] DBI Package

2007-10-30 Thread Prof Brian Ripley
On Wed, 31 Oct 2007, Germán Carrillo wrote: Hello everyone! Congratulations by this gorgeous software. My name is Germán Carrillo, I'm writting from Colombia. I don't have much experience with R, reason why I use the R-GUI (version 2.5.1) on Windows. I have some problems with DBI package, I w

[R] DBI Package

2007-10-30 Thread Germán Carrillo
Hello everyone! Congratulations by this gorgeous software. My name is Germán Carrillo, I'm writting from Colombia. I don't have much experience with R, reason why I use the R-GUI (version 2.5.1) on Windows. I have some problems with DBI package, I want to connect to PostgreSQL database but I don

Re: [R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-30 Thread jim holtman
Also, your statement should be: colnames(c.data) <- c.names On 10/30/07, Bryan Hanson <[EMAIL PROTECTED]> wrote: > Jim, thanks for the suggestion. There is still something subtle & > non-intuitive going on here. I adapted your code with minor changes as > follows (I had to add the sep argument)

Re: [R] reversing perspective plot axis

2007-10-30 Thread Duncan Murdoch
On 30/10/2007 10:42 PM, Dirk Eddelbuettel wrote: > On 30 October 2007 at 20:17, James wrote: > | I am trying to create a perspective plot with Time on the x-axis, > | Underlying Price on the y-axis, and Option Price on the z-axis. But > > Can't help with persp, but see > http://dirk.ed

Re: [R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-30 Thread jim holtman
Try: inFile <- file("file.csv", "r") Then use inFile where you have "file.csv". You are reopening the file on each call; this keeps the file open. On 10/30/07, Bryan Hanson <[EMAIL PROTECTED]> wrote: > Jim, thanks for the suggestion. There is still something subtle & > non-intuitive going on h

Re: [R] survey weights in sample with replacement

2007-10-30 Thread James Reilly
On 31/10/07 4:03 PM, Azam, Mehtabul wrote: >I am trying to draw a random sample from an household survey with > sample weight. Is there any function in R or Splus which allows this. I'm not sure if this what you're after, but R's pps package lets you sample with probability proportiona

[R] survey weights in sample with replacement

2007-10-30 Thread Azam, Mehtabul
>> Hi, I am trying to draw a random sample from an household survey with sample weight. Is there any function in R or Splus which allows this. Regards, *** Mehtabul Azam Department of Economics Southern Methodist University Dallas TX

Re: [R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-30 Thread Bryan Hanson
Jim, thanks for the suggestion. There is still something subtle & non-intuitive going on here. I adapted your code with minor changes as follows (I had to add the sep argument) but get different behavior: c.names <- scan("file.csv", what='', nlines=1, sep=",") # read column names c.options <- r

Re: [R] reversing perspective plot axis

2007-10-30 Thread Dirk Eddelbuettel
On 30 October 2007 at 20:17, James wrote: | I am trying to create a perspective plot with Time on the x-axis, | Underlying Price on the y-axis, and Option Price on the z-axis. But Can't help with persp, but see http://dirk.eddelbuettel.com/code/rquantlib-rgl.html for some animated

[R] reversing perspective plot axis

2007-10-30 Thread James
Hi, I am trying to create a perspective plot with Time on the x-axis, Underlying Price on the y-axis, and Option Price on the z-axis. But I don't like the way my x-axis is setup. Right now, Time is this sequence. Time = seq(from = 1/52, to = 1, by=1/52) That results in the x-axis going f

Re: [R] R installation on Linux/SuSE10.3

2007-10-30 Thread Maura E Monville
I am installing in /usr/local/bin where I have to be root even if I changed the access right to some sub directories by chmod. The installation completed fine (all stages: /config, make, make install). But no icon was created on my desktop. It works just typing in on the command line. It has no GU

Re: [R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-30 Thread jim holtman
Here is one way. You will probably use 'file' instead of textConnection > x.in <- textConnection('wavelength SampleA SampleB SampleC SampleD + color "green" "black" "black" "green" + class "Class 1" "Class 2" "Class 2" "Class 1" + 403 1.94E-01 2.14E-01 2.11E-01 1.83E-01 + 409 1.92E-01 1.89E-0

[R] Difficulty Compiling RSQLite on Solaris x86 Using Studio 12 Compilers

2007-10-30 Thread Aric Gregson
Apologies if this is not the best list on which to ask for help. I have compiled R 2.6.0 using Sun Studio 12 compilers. I can install most CRAN and bioconductor packages that I need, with the exception of RSQLite. Unfortunately this is critical for other packages that I need. I have tried to compil

[R] data types changing

2007-10-30 Thread dmmtchll
List, I am attempting to take a row of data from one matrix to another if it satisfies a certain condition. When R puts the data in the new matrix it is changing the characters to integers and giving them values which aren't very helpful to my analysis. I would use as.character, but I need to

Re: [R] R 2.6.0 crashes when opening some .R files

2007-10-30 Thread Ben Bolker
andersrm wrote: > > Why would R 2.6.0 crash when opening .R files created with an older > version of > R, but apparently not when opening .R files created with the current > version? > Even cutting and pasting text from older .R files does not prevent this > from > happening. > > Richard Ande

Re: [R] data.frame, ggplot vs matplot

2007-10-30 Thread Ben Bolker
baptiste Auguié-2 wrote: > > Hello, > > > I've been trying to use ggplot, but I cannot seem to get my data in > the correct form. I usually have a vector x, and a matrix y and I > would usually use matplot(x,y) to plot the columns of y against x. > > Now, if i understand correctly, I sho

[R] R 2.6.0 crashes when opening some .R files

2007-10-30 Thread andersrm
Why would R 2.6.0 crash when opening .R files created with an older version of R, but apparently not when opening .R files created with the current version? Even cutting and pasting text from older .R files does not prevent this from happening. Richard Anderson __

Re: [R] How to test combined effects?

2007-10-30 Thread Gang Chen
Dieter, Thank you very much for the help! I tried both glht() in multcomp and estimable() in gmodels, but couldn't get them work as shown below. Basically I have trouble specifying those continuous variables. Any suggestions? Also it seems both glht() and estimable() would give multiple t

Re: [R] Homework help: Is this how CI using t dist are constructed?

2007-10-30 Thread Rolf Turner
On 31/10/2007, at 9:52 AM, Achim Zeileis wrote: > On Tue, 30 Oct 2007, Zembower, Kevin wrote: > >> I'm trying to replicate some of the examples from my textbook in R >> (my >> text uses Minitab). In this problem, I'm trying to construct a 95% >> confidence interval for these distance measuremen

Re: [R] VGAM and vglm

2007-10-30 Thread Thomas Yee
Hi Ted, yes, vglm(..., family=binomialff(mv=TRUE)) does treat each response as independent. You can see that with coef(fit, matrix=TRUE) where fit is the object. If you want to model two dependent binary responses then you can try the VGAM family functions binom2.or(), loglinb2(), binom2.rho().

Re: [R] Homework help: Is this how CI using t dist are constructed?

2007-10-30 Thread Zembower, Kevin
Yes, exactly. In fact, I had already discovered this, too. I don't know why I didn't think of it before asking this question. Thanks for your patience with me. -Kevin -Original Message- From: Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 30, 2007 4:54 PM To: Zembower,

Re: [R] NAIVE BAYES with 10-fold cross validation

2007-10-30 Thread Kuhn, Max
> am trying to implement the code of the e1071 package for naive bayes, > but it doens't really work, any ideas?? > am very glad about any help!! > need a naive bayes with 10-fold cross validation: The caret package will do this. Use fit <- train( x, y, method = "nb", trControl = trainCo

Re: [R] high RAM on Linux or Solaris platform

2007-10-30 Thread Prof Brian Ripley
On Tue, 30 Oct 2007, Thomas Lumley wrote: > On Tue, 30 Oct 2007, David Bickel wrote: > >> To help me make choices regarding a platform for running high-memory R >> processes in parallel, I would appreciate any responses to these >> questions: >> >> 1. Does the amount of RAM available to an R sessi

Re: [R] Homework help: Is this how CI using t dist are constructed?

2007-10-30 Thread Peter Dalgaard
Zembower, Kevin wrote: > I'm trying to replicate some of the examples from my textbook in R (my > text uses Minitab). In this problem, I'm trying to construct a 95% > confidence interval for these distance measurements [1]: > > >> # Case Study 7.4.1, p. 483 >> x <- scan() >> > 1: 62 52 68

Re: [R] Homework help: Is this how CI using t dist are constructed?

2007-10-30 Thread Achim Zeileis
On Tue, 30 Oct 2007, Zembower, Kevin wrote: > I'm trying to replicate some of the examples from my textbook in R (my > text uses Minitab). In this problem, I'm trying to construct a 95% > confidence interval for these distance measurements [1]: > > > # Case Study 7.4.1, p. 483 > > x <- scan() > 1:

[R] NAIVE BAYES with 10-fold cross validation

2007-10-30 Thread Julia Kröpfl
hi there!! i am trying to implement the code of the e1071 package for naive bayes, but it doens't really work, any ideas?? i am very glad about any help!! i need a naive bayes with 10-fold cross validation: code: library(e1071) model <- naiveBayes(code ~ ., mydata) tune.control <- tune.control

Re: [R] Error message on script execution

2007-10-30 Thread Sébastien
Dear R_users, I am coming back to you about this problem, since I could not solve it by myself and because I did not receive any reply the first time I put the post on the list. Thanks in advance for any help you could provide. Sebastien Sébastien a écrit : > Dear R_users, > > I have some tro

[R] Fwd: data format

2007-10-30 Thread Emre Unal
Excuse me for less detailed e-mail I've sent before, I guess there's a misunderstanding here. My problem is to use the data in the order I've typed below without splitting it. Is it possible? I really don't know. Some statistics packages do it. Original Data is; Good,Bad 10,12 15,15 18,10 12 B

[R] markov regime switching models

2007-10-30 Thread valentina bonetti
Hi, I am looking for a package to estimate regime switching models (states following a markov chain). I found packages for Hidden Markov Models but I am looking for something a little different: In the HMM the conditional distribution of the observations (give the state) is a known distribution (n

Re: [R] R installation on SuSE 10.3

2007-10-30 Thread Detlef Steuer
Hi, On Tue, 30 Oct 2007 14:44:17 -0500 "Maura E Monville" <[EMAIL PROTECTED]> wrote: > I have downloaded the source code for Linux. > the ./configure procedure can find gcc but cannot find f77 or f2c > I have looked for the above compiler with Test and installed all what > pertains to Fortran. St

[R] Homework help: Is this how CI using t dist are constructed?

2007-10-30 Thread Zembower, Kevin
I'm trying to replicate some of the examples from my textbook in R (my text uses Minitab). In this problem, I'm trying to construct a 95% confidence interval for these distance measurements [1]: > # Case Study 7.4.1, p. 483 > x <- scan() 1: 62 52 68 23 34 45 27 42 83 56 40 12: Read 11 items > al

Re: [R] R installation on SuSE 10.3

2007-10-30 Thread Kevin E. Thorpe
Maura E Monville wrote: > I have downloaded the source code for Linux. > the ./configure procedure can find gcc but cannot find f77 or f2c > I have looked for the above compiler with Test and installed all what > pertains to Fortran. Still not even the man pages for f77 anf fc2 work >. > > Where i

Re: [R] high RAM on Linux or Solaris platform

2007-10-30 Thread Thomas Lumley
On Tue, 30 Oct 2007, David Bickel wrote: > To help me make choices regarding a platform for running high-memory R > processes in parallel, I would appreciate any responses to these > questions: > > 1. Does the amount of RAM available to an R session depend on the > processor (Intel vs. Sun) or on

[R] data.frame, ggplot vs matplot

2007-10-30 Thread baptiste Auguié
Hello, I've been trying to use ggplot, but I cannot seem to get my data in the correct form. I usually have a vector x, and a matrix y and I would usually use matplot(x,y) to plot the columns of y against x. Now, if i understand correctly, I should cast x and y into a data.frame and do som

Re: [R] bitmap patterns in R fill

2007-10-30 Thread Greg Snow
There was a thread a couple of months back on filling a curve with a color gradient, you could apply those same techniques with a bitmap pattern (some adjustments may be necessary). Or this may be something better suited to an outside program like gimp or imagemagick. You should also ask yourself

Re: [R] calculate spatial distance

2007-10-30 Thread Gabor Grothendieck
Check out rdist.earth in the fields package. On Oct 30, 2007 11:49 AM, <[EMAIL PROTECTED]> wrote: > Hi, > I have a set of locations defined by longitude and latitude (in degrees), > and want to calculate the spatial (or geographic) distance among all > locations. > I did not find such a function

[R] R installation on SuSE 10.3

2007-10-30 Thread Maura E Monville
I have downloaded the source code for Linux. the ./configure procedure can find gcc but cannot find f77 or f2c I have looked for the above compiler with Test and installed all what pertains to Fortran. Still not even the man pages for f77 anf fc2 work >. Where is f77 and f2c with linux 10.3 ?? Th

[R] Reading a file with read.csv: two character rows not interpreted as I hope

2007-10-30 Thread Bryan Hanson
Hi Folks... Œbeen playing with this for a while, with no luck, so I¹m hoping someone knows it off the top of their head... Difficult to find this nuance in the archives, as so many msgs deal with read.csv! I¹m trying to read a data file with the following structure (a little piece of the actual d

Re: [R] calculate spatial distance

2007-10-30 Thread Charles C. Berry
RSiteSearch("longitude distance") pops up a bunch of results that seem pertinent. e.g. R: Distance Between Geographic Coordinates (score: 4) R: Distance Along Great Circle Arc (score: 2) ?? On Tue, 30 Oct 2007, Sarah Goslee wrote: > I don't know of such a function,

Re: [R] calculate spatial distance

2007-10-30 Thread Sarah Goslee
I don't know of such a function, but you have several options: 1. Assume that Euclidean distance is "good enough" - probably reasonable over a limited geographic region (and commonly done). 2. Use your GIS software to do the calculations since it already "understands" projections and distances on

[R] timezone conversion difficulties with the new US daylight saving time switch over

2007-10-30 Thread Tony Plate
I'm having difficulties with daylight saving times in US time zones. (Apologies for the long post, but the problem seems subtle and complex, unless I'm doing something completely wrong, in which case it should be evident from the first 10 lines below.) This is what I see, using a (slightly modifie

Re: [R] Implementing R through Oracle

2007-10-30 Thread elw
> I have been looking for a statistical package that I can implement in > our application and I came across R. We run an n-Tier environment with > an Oracle 10g backend. Our design is to keep all business logic in the > backend. What I would like to do is call R from pl/sql. I noticed that >

[R] Implementing R through Oracle

2007-10-30 Thread jah
I have been looking for a statistical package that I can implement in our application and I came across R. We run an n-Tier environment with an Oracle 10g backend. Our design is to keep all business logic in the backend. What I would like to do is call R from pl/sql. I noticed that ROracle is desi

Re: [R] Place a string into the header/footer of a pdf file generated during a plot session

2007-10-30 Thread Henrique Dallazuanna
Perhaps you can use mtext: plot(rnorm(100), col="red", pch=16) mtext(getwd(), side=1, line=3, outer=F, adj=0, cex=0.7) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 30/10/2007, Tudor Bodea <[EMAIL PROTECTED]> wrote: > > Dear useRs, > > Do you know, by any chance

Re: [R] Newey-West and SUR regression models

2007-10-30 Thread Markus Jäntti
Achim Zeileis wrote: > On Fri, 26 Oct 2007, Richard Saba wrote: > >> Is anyone aware of a procedure to apply Newey-West corrections for >> autocorrelation to a SUR regression model? The SANDWICH package seems to be >> applicable only to LM or GLM models. > > No, "sandwich" is applicable to any es

[R] Place a string into the header/footer of a pdf file generated during a plot session

2007-10-30 Thread Tudor Bodea
Dear useRs, Do you know, by any chance, if it is possible to write a string in the header/footer of a pdf file created during a plot session? To make sure that I know what R script generated a certain chart, I would like to add the path to the working directory into the header/footer of the corres

Re: [R] strwidth of bold font

2007-10-30 Thread Roland Kaiser
Thanks it does the trick! > Perhaps: > > strwidth(expression(bold("text"))) > > > On 30/10/2007, Roland Kaiser <[EMAIL PROTECTED]> wrote: Hi! > > Is there a way to get the string width of the bold typefaces? > > like: strwidth("text", family = "serif", font = 2). > > Thanks > > Roland > > ___

Re: [R] data format

2007-10-30 Thread Julian Burgos
There are many ways. A simple one is to use split() to divide your 'Value' column using your 'Label' column as index. For example, # Create dataset mydata=data.frame(Label=c('Good','Bad','Good','Good','Good','Bad','Bad'), Value=c(10,12,15,18,12,15,10)) # Split the data mydata=split(mydata$Valu

Re: [R] Splitting up the micEcon package?

2007-10-30 Thread Robert Duval
Dear Arne and Ott-Simm It always seemed weird to me mixing demand and firm models with SSel. models on a single package. Separating them would seem the logical thing to do. On the other hand, one more R package :/ , I´m not too big of a fan of increasing this list ad infinitum. My take on this

Re: [R] strwidth of bold font

2007-10-30 Thread Henrique Dallazuanna
Perhaps: strwidth(expression(bold("text"))) On 30/10/2007, Roland Kaiser <[EMAIL PROTECTED]> wrote: > > Hi! > > Is there a way to get the string width of the bold typefaces? > > like: strwidth("text", family = "serif", font = 2). > > Thanks > > Roland > >

[R] strwidth of bold font

2007-10-30 Thread Roland Kaiser
Hi! Is there a way to get the string width of the bold typefaces? like: strwidth("text", family = "serif", font = 2). Thanks Roland __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide htt

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Achim Zeileis
On Tue, 30 Oct 2007, Michael Ash wrote: > On 10/30/07, Christian Ritz <[EMAIL PROTECTED]> wrote: > > in the MLE setting the score function (no expectation taken) is the > > estimating function. So for the OLS situation the basic estimating > > function is: (in the terminology of Zeileis' paper) >

[R] high RAM on Linux or Solaris platform

2007-10-30 Thread David Bickel
To help me make choices regarding a platform for running high-memory R processes in parallel, I would appreciate any responses to these questions: 1. Does the amount of RAM available to an R session depend on the processor (Intel vs. Sun) or on the OS (various Linux distributions vs. Solaris)? 2.

Re: [R] axis title on two lines

2007-10-30 Thread John Kane
I'm glad it worked. We must have slightly different settings of some kind as my results with the single mtext gives me two lines centred. Strange. --- Marcel Sandow <[EMAIL PROTECTED]> wrote: > Thanksmtext is exactly what I am looking for. Using > \n inside gave the same results as before. But

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
On 10/30/07, Christian Ritz <[EMAIL PROTECTED]> wrote: > in the MLE setting the score function (no expectation taken) is the > estimating function. So for the OLS situation the basic estimating > function is: (in the terminology of Zeileis' paper) > > psi(x,y,beta) = (y - x^t beta) x^t Thanks! Th

[R] force interactive

2007-10-30 Thread George Georgalis
I'd like to invoke R using a fifo for input. The following unix commands gets me almost completely there: mkfifo R.fifo R --no-save R.out in a separate window, I would enter the command eg printf "capabilities()" >R.fifo the expected output goes into R.out; but the process stops. How to I make

Re: [R] Where can I find package "segmented" ?

2007-10-30 Thread John Kane
I think you already have it installed and loaded. Try search() and see if it appears. --- Maura E Monville <[EMAIL PROTECTED]> wrote: > I tried to install "segmented" from three different > repositories but I keep > getting the following message on R window: ... > Please, advice where to find >

Re: [R] time difference error

2007-10-30 Thread jim holtman
I think the error message says it all. "fix" can not handle the data type of tdiff: > tdiff <-structure(c(168, NA, NA, 165, 175, 140, 191, 195, 130, 160, 135, + 165, 330, 178, 141, NA, 119, 90, 70, 99, 115, 70, 65, 90, 90, 65, 90, 75, + 85, 93, 52, 75, 60, 90, 105, 70, 65, 60, 85, 110, 65, 60,

Re: [R] data format

2007-10-30 Thread jim holtman
Here is how to read it in. Then you can run your analysis: > x <- read.csv(textConnection("Label,Value + Good,10 + Bad,12 + Good,15 + Good,18 + Good,12 + Bad,15 + Bad,10")) > x Label Value 1 Good10 2 Bad12 3 Good15 4 Good18 5 Good12 6 Bad15 7 Bad10 On 10/

Re: [R] How to switch off accepting the shortcut of column names

2007-10-30 Thread Julian Burgos
You cannot call a column on a dataframe using the first letter (or first few letters) if the letters match more than one name. Extraction methods for data frames allow partially matching row names, but if the result is undefined you get NULL in return. Try this. >first_item <- seq(1,10) >

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Christian Ritz
Hi again, in the MLE setting the score function (no expectation taken) is the estimating function. So for the OLS situation the basic estimating function is: (in the terminology of Zeileis' paper) psi(x,y,beta) = (y - x^t beta) x^t Christian __ R

[R] Splitting up the micEcon package?

2007-10-30 Thread Arne Henningsen
Dear R Users: The functions of our "micEcon" package [1,2] can be subdivided into three categories: - microeconomic demand and firm models - sample selection models (mainly selection()) - routines for (likelihood) maximisation (e.g. maxLik(), maxNR(), maxBHHH()) (mainly used for ML estimation

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
On 10/30/07, Christian Ritz <[EMAIL PROTECTED]> wrote: > Use 'model.matrix' to construct a design matrix: > > x <- runif(10,0,10) > model.matrix(~x) Thanks! That's super helpful. > The following article by A. Zeileis provides more details on the > package 'sandwich': > http://www.jstatsoft.org/

[R] kernlab/ ksvm: class.weights & prob.model in binary classification

2007-10-30 Thread Dominik Gallus
Hello list, I am faced with a two-class classification problem with highly asymetric class sizes (class one: 99%, class two: 1%). I'd like to obtain a class probability model, also introducing available information on the class prior. Calling kernlab/ksvm with the line > ksvm_model1<-ksvm(as.m

Re: [R] flexible processing

2007-10-30 Thread Gabor Grothendieck
Check out summaryBy in the doBy package: > library(doBy) > summaryBy(. ~ fac1, data = df, FUN = c(sum, mean, sd))[c(1,2,5,7)] fac1 par1.sum par2.mean par2.sd 1 group1 12.37374 25.5 14.57738 2 group2 37.62626 75.5 14.57738 > summaryBy(. ~ fac2, data = df, FUN = c(sum, mean, sd))[c(1,

[R] time difference error

2007-10-30 Thread Jojje Andersson
Hello! I posted this question earlier but it seems that something went wrong, so I post it again. I have a problem making a new variabel in a dataframe that consists of a time difference. It seems that the new variable gets into the dataframe but I cant look at it anymoore. Here is what happens.

[R] calculate spatial distance

2007-10-30 Thread robert . ptacnik
Hi, I have a set of locations defined by longitude and latitude (in degrees), and want to calculate the spatial (or geographic) distance among all locations. I did not find such a function in the spatial-related packages. (I *cannot* use 'dist', as I have geographic, not cartesian coordinates). tha

Re: [R] flexible processing

2007-10-30 Thread Henrique Dallazuanna
analysis <- lapply(c("fac1", "fac2"), function(x){ cbind.data.frame(par1.sum= do.call("rbind",lapply(lapply(split(df, eval(parse(text=x))), "[[", 1), sum)), par2.mean=do.call("rbind",lapply(lapply(split(df, eval(parse(text=x))), "[[", 2), mean)), par2.sd= do.call("rbind",lapply(lapply(split(df,

Re: [R] flexible processing

2007-10-30 Thread Henrique Dallazuanna
Hi, No is the more elegant way analysis <- lapply(c("fac1", "fac2"), function(x){ cbind.data.frame(par1.sum= do.call("rbind",lapply(lapply(split(df, eval(parse(text=x))), "[[", 1), sum)), par2.mean=do.call("rbind",lapply(lapply(split(df, eval(parse(text=x))), "[[", 2), mean)), par2.sd= do.ca

Re: [R] Where can I find package "segmented" ?

2007-10-30 Thread Prof Brian Ripley
This is an FAQ: rw-FAQ 4.8. On Tue, 30 Oct 2007, Maura E Monville wrote: > I tried to install "segmented" from three different repositories but I keep > getting the following message on R window: ... Please, advice where to find > this package. > > Thank you in advance. > Maura > >> utils:::menu

Re: [R] How to switch off accepting the shortcut of column names

2007-10-30 Thread Prof Brian Ripley
If you had updated your R before posting (as the posting guide suggested) you would have found such an option under ?options. It was new in R 2.6.0. On Tue, 30 Oct 2007, P. Olsson wrote: > Dear R-users, > > currently I am working with the R version 2.4.1. > I realized it has a feature, which

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Christian Ritz
Dear Michael, as to questions 1) and 2): The following article by A. Zeileis provides more details on the package 'sandwich': http://www.jstatsoft.org/v16/i09/ (see also the references). Use 'model.matrix' to construct a design matrix: x <- runif(10,0,10) model.matrix(~x) Christian

[R] Where can I find package "segmented" ?

2007-10-30 Thread Maura E Monville
I tried to install "segmented" from three different repositories but I keep getting the following message on R window: ... Please, advice where to find this package. Thank you in advance. Maura > utils:::menuInstallPkgs() --- Please select a CRAN mirror for use in this session --- Warning: packag

Re: [R] Polygon shading line colors

2007-10-30 Thread Prof Brian Ripley
On Tue, 30 Oct 2007, Luke Spadavecchia wrote: > Hi there, > > I'm having trouble working out how to change the colors of polygon > shading lines. If I plot a polygon with > > polygon(poly,density=30,borders=gray(0.5)) > > I get gray borders but black shading lines; I have tried adding > col=gray(0

[R] Polygon shading line colors

2007-10-30 Thread Luke Spadavecchia
Hi there, I'm having trouble working out how to change the colors of polygon shading lines. If I plot a polygon with polygon(poly,density=30,borders=gray(0.5)) I get gray borders but black shading lines; I have tried adding col=gray(0.5), bg=gray(0.5) and fg=gray(0.5), but no luck. How can I

[R] flexible processing

2007-10-30 Thread Antje
Hello, unfortunately, I don't know a better subject. I would like to be very flexible in how to process my data. Assume the following dataset: par1 <- seq(0,1,length.out = 100) par2 <- seq(1,100) fac1 <- factor(rep(c("group1", "group2"), each = 50)) fac2 <- factor(rep(c("group3", "group4", "grou

Re: [R] proportional curves

2007-10-30 Thread Thomas Lumley
On Tue, 30 Oct 2007, raymond chiruka wrote: > hie > > I know this might not be the right forum but can anyone tell me what > parameters i can possibly use to generate proportional survival curves > using rweibull(n,shape,scale). For the Weibull family, curves with different scale and the same

[R] bitmap patterns in R fill

2007-10-30 Thread Jonathan Lees
Is there a way in R to specify a bitmap pattern and have it fill a region or polygon? This feature is available in many MAC programs and Adobe illustrator, and I know how to do this programming in postscript, But I can't find anything in the documentation relating how to do this in R. Thanks, Jo

[R] data format

2007-10-30 Thread Emre Unal
Hi, How can I analyze the data collected in database formatting (with labels) rather than splitted by individual columns (almost in excel)? For example (comma separated data); Label,Value Good,10 Bad,12 Good,15 Good,18 Good,12 Bad,15 Bad,10 etc... ks.test or chisq.test can be done. Splitting th

Re: [R] Converting a string

2007-10-30 Thread Gang Chen
Thanks a lot for all who've provided help! Yes the accusation of obfuscation is well-justified. Sorry I was not specific enough in the original post. But I'm lost at this point. What I want to do is this: > contrast(ModelFit, list(Trust="T", Sex=levels(Model$Sex), Freq=levels(Model$Freq))

[R] How to switch off accepting the shortcut of column names

2007-10-30 Thread P. Olsson
Dear R-users, currently I am working with the R version 2.4.1. I realized it has a feature, which might be wonderful (as so many things in R), but in this case might be a bit dangerous as well. It seems that columns of a data frame can be called just by indicating the first letter of the name of

Re: [R] axis title on two lines

2007-10-30 Thread Marcel Sandow
Thanksmtext is exactly what I am looking for. Using \n inside gave the same results as before. But using two independent mtext code lines with defferent line settings worked perfectly.- Ursprüngliche Nachricht -Von: John Kane Datum: Dienstag, Oktober 30, 2007 2:56 pmBetreff: Re: [R] axis

Re: [R] axis title on two lines

2007-10-30 Thread John Kane
You might want to replace the xlab with mtext? aa <- 1:10 plot(aa, xlab='') mtext("label one \n label number two" , side=1, line=3) --- Marcel Sandow <[EMAIL PROTECTED]> wrote: > Hello,I am searching for the possibility to make a > two lines axis title. This > suggestion:ylab=expression(paste(

Re: [R] Sweave line length

2007-10-30 Thread Keith Jones
>Kevin, Your suggestion got me on the right track. The R command: option(width=50), sets the text width for R to 50 columns per line. When Sweave is run it breaks lines into 50 columns per line. The only exception to this is when there is a command like setwd("/Users/keithjones/Documents/Da

[R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
Dear R-help, I have a four-part question about regression, matrices, and sandwich package. 1) In the sandwich package, I would like to better understand the meat() function. >From the bread() documentation, for a simple OLS regression, bread() returns (1/n * X'X)^(-1) That is, for a simple reg

[R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
Dear R-help, I have a four-part question about regression, matrices, and sandwich package. 1) In the sandwich package, I would like to better understand the meat() function. >From the bread() documentation, for a simple OLS regression, bread() returns (1/n * X'X)^(-1) That is, for a simple reg

Re: [R] Sweave line length

2007-10-30 Thread Duncan Murdoch
On 10/30/2007 8:55 AM, Kevin E. Thorpe wrote: > Keith Jones wrote: >> Hello, >> >> I am trying to add R code to my dissertation and the length of a line >> of text that Sweave generates is longer than the right margin in my >> dissertation. I have found no way to tell Sweave how to set the line

Re: [R] How to test combined effects?

2007-10-30 Thread Dieter Menne
Gang Chen mail.nih.gov> writes: > > Suppose I have a mixed-effects model where yij is the jth sample for > the ith subject: > > yij= beta0 + beta1(age) + beta2(age^2) + beta3(age^3) + beta4(IQ) + > beta5(IQ^2) + beta6(age*IQ) + beta7(age^2*IQ) + beta8(age^3 *IQ) > +random intercepti +

Re: [R] Sweave line length

2007-10-30 Thread Kevin E. Thorpe
Keith Jones wrote: > Hello, > > I am trying to add R code to my dissertation and the length of a line > of text that Sweave generates is longer than the right margin in my > dissertation. I have found no way to tell Sweave how to set the line > length. I am using an iMac with tiger ver. 10.4.

[R] Sweave line length

2007-10-30 Thread Keith Jones
Hello, I am trying to add R code to my dissertation and the length of a line of text that Sweave generates is longer than the right margin in my dissertation. I have found no way to tell Sweave how to set the line length. I am using an iMac with tiger ver. 10.4.10, and R: ver. 2.5.1. Here i

Re: [R] How to make own function load automatically on startup

2007-10-30 Thread Jonas Malmros
Thanks, Hans-Peter, But still, this is quite difficult to understand for non-initiated. What do expressions "exported variable" and "internal variable" mean? What is "name space"? In LAYMAN terms. Thanks in advance! On 10/29/07, Hans-Peter <[EMAIL PROTECTED]> wrote: > > > My code contains followi

Re: [R] postscript(), used from a pre R-2.6.0 workspace

2007-10-30 Thread Prof Brian Ripley
postscript() is supposed to read and write .PostScript.Options from a private environment, so one question is how .PostScript.Options got to be in the workspace: I suspect a much older version of R put it there, not least because it would seem to be using an encoding (and case) relevant to Clas

[R] axis title on two lines

2007-10-30 Thread Marcel Sandow
Hello,I am searching for the possibility to make a two lines axis title. This suggestion:ylab=expression(paste("log rate\n[ fluor.",inc. %.% cell^{-1} %.% sec^{-1}," ]"))results in two lines left not centered and with a large gap.any suggestions.ThanksMarcel  ___

Re: [R] Query installing R on Mac OS X Leopard (new release)...

2007-10-30 Thread Prof Brian Ripley
MacOS X users, please note: - https://stat.ethz.ch/mailman/listinfo/r-sig-mac R Special Interest Group on Development for Mac OS X. This list might be used also for bug reports or feature requests on the R application for OS X. - which contains threads on this issue.

[R] Query installing R on Mac OS X Leopard (new release)...

2007-10-30 Thread Rob Hodgkinson
Thanks to Mark, Moshe and David for helpful responses to my query on Regression. I am now trying to install on my Macbook Pro running OS X 10.5 (ie Leopard) since last weeken, so far without issue. At the prompt ³Installation Type² (after destination drive is selected) the 4 parts to be checked

Re: [R] postscript(), used from a pre R-2.6.0 workspace

2007-10-30 Thread Peter Dalgaard
John Maindonald wrote: > I find that if start R-2.6.0 in a workspace with no .RData file, > load one of my workspaces from R-2.5.1 or earlier into R-2.6.0, > and then before doing anything else type postscript(file="z.ps"), > I get:: > > > ls() > character(0) > > load(url("http://www.maths.anu.ed

[R] Plotting question: how to plot SNP location data?

2007-10-30 Thread Lauri.Nikkinen
Hello, I would like to plot specific SNPs with their exact locations on a chromosome. Based on my genotyping results I would like to separate these SNPs in three different categories: 1, 2 and 3 and use different colours to represent these categories. The script below generates the sample data. I

Re: [R] postscript(), used from a pre R-2.6.0 workspace

2007-10-30 Thread John Maindonald
I find that if start R-2.6.0 in a workspace with no .RData file, load one of my workspaces from R-2.5.1 or earlier into R-2.6.0, and then before doing anything else type postscript(file="z.ps"), I get:: > ls() character(0) > load(url("http://www.maths.anu.edu.au/~johnm/r/test5.RData";)) > posts

  1   2   >