Re: [R] sequence that counts up and back down

2009-02-05 Thread Dimitris Rizopoulos
one way is the following: 5 - abs(-4:4) I hope it helps. Best, Dimitris Monte Milanuk wrote: I hit a minor sticking point working one of the problems in 'Using R' (Verzani). I'm having difficulty with generating a sequence that goes 1, 2, 3, 4, 5, 4, 3, 2, 1. I can make one that counts up

Re: [R] eval and as.name

2009-02-05 Thread Dieter Menne
Wacek Kusnierczyk idi.ntnu.no> writes: > equal? you mean equivalent? mostly, yes. briefly, this is why: > > 1. a copy-over from other programming languages; > 2. to avoid learning yet another operator; > 3. after having learned the other operator, to avoid that ugly operator; > 4. after an r

Re: [R] Incorrect p value for binom.test?

2009-02-05 Thread Thomas Lumley
On Thu, 5 Feb 2009, Albyn Jones wrote: The computation 2*sum(dbinom(c(10:25),25,0.061)) does not correspond to any reasonable definition of p-value. For a symmetric distribution, it is fine to use 2 times the tail area of one tail. For an asymetric distribution, this is silly. "Silly" is muc

Re: [R] Sweave and backslashes

2009-02-05 Thread Dieter Menne
cls59 mac.com> writes: > I am an avid Sweave user and I am trying to pretty print floating point > numbers for latex output. For example in my document, I would like: > > 4.2\cdot 10^-{8} > > Instead of: > > 4.2e-08 > > The Hmisc package has a nice function for doing this- but Hmisc has a ton

Re: [R] Text Mining

2009-02-05 Thread cruz
There is an interesting article "An Introduction to Text Mining in R" by Ingo Feinerer on R News Volume 8/2, October 2008 (http://www.r-project.org/doc/Rnews/Rnews_2008-2.pdf) Check it out On Fri, Feb 6, 2009 at 9:16 AM, spiketide wrote: > > hi everyone... > > i am a newbie to text mining.

[R] How to convert Charagter variables into numeric

2009-02-05 Thread Arup
I am importing a dataset in R where some of the variable are numerical and some of them are character...but the problem is that R is treating numerical variables as character (I am using "is.character" to judge the type). Now the question is how can I convert these character variables into numeri

[R] R Interface Coming to SAS/IML Studio

2009-02-05 Thread Carlos J. Gil Bellosta
Hello, I thought this link could be of interest to the list. http://support.sas.com/rnd/app/studio/Rinterface2.html Best regards, Carlos J. Gil Bellosta http://www.datanalytics.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

[R] sequence that counts up and back down

2009-02-05 Thread Monte Milanuk
I hit a minor sticking point working one of the problems in 'Using R' (Verzani). I'm having difficulty with generating a sequence that goes 1, 2, 3, 4, 5, 4, 3, 2, 1. I can make one that counts up, I can make one that counts down, etc. but one that counts up then down like this (short of just

[R] MLE for right-censored data with covariates

2009-02-05 Thread krogovin
I am a student (and very to new to R) working on a senior design project that is attempting to determine the demand distributions for single copy newspaper draws at individual sales outlet locations. Our sales data is right-censored, because sell-outs constitute a majority of the data, and we are

Re: [R] subset problem (reducing from six to two levels)

2009-02-05 Thread Ine
Great, this worked for me, exactly how I needed it. Thanks for all the replies! Peter Dalgaard wrote: > > Ine wrote: >> Hi all, >> I have got a seemingly simple problem (I am an R starter) with subsetting >> my >> data set, but cannot figure out the solution: I want to subset a data set >> from

Re: [R] Text Mining

2009-02-05 Thread spiketide
hi everyone... i am a newbie to text mining. and i gotta do my project in it i've looked up various infos online but still haven't got an idea on where to start so please, if anyone gave suggestions on this, it will be really helpful... thanks a lot in advance -- View this

[R] Classification problem

2009-02-05 Thread anil rohilla
Hi List, I want to do classification using neural network (e.g Package neural, Amore etc). How these packages handles nominal variables. Is there any specific coding we have to use or we have to do dummy coding for each nominal variable. Any help will be appreciated. Is any body know how to do c

Re: [R] Problems in Recommending R

2009-02-05 Thread hadley wickham
On Thu, Feb 5, 2009 at 8:56 PM, Patrick Connolly wrote: > On Sun, 01-Feb-2009 at 11:34PM -0500, Stavros Macrakis wrote: > > |> A first step that would make the current Web page look much better > |> would be to anti-alias the demonstration graphic. The current graphic > |> makes R graphics seem (

Re: [R] Sweave and backslashes

2009-02-05 Thread Charles C. Berry
On Thu, 5 Feb 2009, cls59 wrote: Hello Everyone, I am an avid Sweave user and I am trying to pretty print floating point numbers for latex output. For example in my document, I would like: 4.2\cdot 10^-{8} Instead of: 4.2e-08 The Hmisc package has a nice function for doing this- but Hmisc

Re: [R] Sweave and backslashes

2009-02-05 Thread Frank E Harrell Jr
cls59 wrote: Hello Everyone, I am an avid Sweave user and I am trying to pretty print floating point numbers for latex output. For example in my document, I would like: 4.2\cdot 10^-{8} Instead of: 4.2e-08 The Hmisc package has a nice function for doing this- but Hmisc has a ton of dependenc

[R] Copula-GARCH

2009-02-05 Thread ahmed_shamiri
Hello,   I have two time series, and I want to obtain copula-GARCH. I know how to model the data with GARCH models but how to incorporate the GARCH model with copula is what I need.   Can anyone give me some tips about the code to estimate the copula-GARCH?   Thanks in advance   Shamiri _

Re: [R] Problems in Recommending R

2009-02-05 Thread Patrick Connolly
On Sun, 01-Feb-2009 at 11:34PM -0500, Stavros Macrakis wrote: |> A first step that would make the current Web page look much better |> would be to anti-alias the demonstration graphic. The current graphic |> makes R graphics seem (falsely!) to be very primitive. I'm afraid I |> don't know how to

[R] Comparing weighted histograms?

2009-02-05 Thread Farley, Robert
I'm trying to plot and compare weighted histograms and I can't seem find where to start. I have data similar to this: Miles2LAX RADAM2005Pct LAWA2005Pct 35.57.00123.00684 24.74.00118.00187 27.09.00965

[R] Can you send out an email message through Lotus Notes clients from an R script?

2009-02-05 Thread Elaine Jones
Can R do emailing via the Lotus Notes API like SAS can? Canyou run a script and based on results send out an email report? I just briefly looked through the packages and didn't see one that looked like it might be it, but that conclusion was based on the package names only. Is anyone using R

Re: [R] eval and as.name

2009-02-05 Thread Gabor Grothendieck
Try this: library(quantmod) s <- c("MSFT","AAPL","ORCL") f <- function(x) Delt(Cl(getSymbols(x, auto.assign = FALSE))) Delt3 <- do.call(merge, lapply(s, f)) plot(as.zoo(Delt3), screen = 1, col = 1:3) On Thu, Feb 5, 2009 at 7:49 PM, Fuchs Ira wrote: > VERY nice. That certainly works. Now how do

Re: [R] eval and as.name

2009-02-05 Thread Fuchs Ira
VERY nice. That certainly works. Now how does one plot all three variables on one graph? :-) Thanks very much. Ira On Feb 5, 2009, at 7:29 PM, Phil Spector wrote: Ira - As you say, there are many ways to solve this problem. Here's one of them: list=c("MSFT","AAPL","ORCL") getSymbols(lis

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Thank you! - Original Message From: "markle...@verizon.net" To: Bill Hyman Sent: Thursday, February 5, 2009 3:35:54 PM Subject: RE: [R] how to separate char and num within a variable hi: you can do below but there should possibly be a better way so I'm sending offline in order to en

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Thx a lot! - Original Message From: Marc Schwartz To: Bill Hyman Cc: r-help@r-project.org Sent: Thursday, February 5, 2009 3:39:53 PM Subject: Re: [R] how to separate char and num within a variable on 02/05/2009 05:20 PM Bill Hyman wrote: > Hi all, > > I read in a column which looks

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Thx a lot! It works - Original Message From: Wacek Kusnierczyk To: Bill Hyman Cc: R help Sent: Thursday, February 5, 2009 3:38:34 PM Subject: Re: [R] how to separate char and num within a variable Bill Hyman wrote: > Hi all, > > I read in a column which looks like "chr1:000889594-00

[R] Sweave and backslashes

2009-02-05 Thread cls59
Hello Everyone, I am an avid Sweave user and I am trying to pretty print floating point numbers for latex output. For example in my document, I would like: 4.2\cdot 10^-{8} Instead of: 4.2e-08 The Hmisc package has a nice function for doing this- but Hmisc has a ton of dependencies and has pr

Re: [R] eval and as.name

2009-02-05 Thread Fuchs Ira
These are all great resposes but I think I should have given a slightly more complete description of the problem. I am using the quantmod package and I have called getSymbols with a character vector that has a list of stock symbols. For example: library("quantmod") list=c("MSFT","AAPL","ORCL"

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
Marie Sivertsen wrote: > Hi, > > Why do you use the equals sign for assignment instead of the arrow, is this > equal? > > equal? you mean equivalent? mostly, yes. briefly, this is why: 1. a copy-over from other programming languages; 2. to avoid learning yet another operator; 3. after havin

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Marc Schwartz
on 02/05/2009 05:20 PM Bill Hyman wrote: > Hi all, > > I read in a column which looks like "chr1:000889594-000889638", and > need to break them into three columns like "chr1:", "000889594" and > "000889638". How shall I do in R. Thanks a lot for your suggestions! See ?strsplit Vec <- "chr1:00088

Re: [R] how to separate char and num within a variable

2009-02-05 Thread Wacek Kusnierczyk
Bill Hyman wrote: > Hi all, > > I read in a column which looks like "chr1:000889594-000889638", and need to > break them into three columns like "chr1:", "000889594" and "000889638". How > shall I do in R. Thanks a lot for your suggestions! > > if strings is your vector of strings, this shoul

Re: [R] eval and as.name

2009-02-05 Thread Marie Sivertsen
Hi, Why do you use the equals sign for assignment instead of the arrow, is this equal? Mvh. Marie On Thu, Feb 5, 2009 at 11:59 PM, Wacek Kusnierczyk < waclaw.marcin.kusnierc...@idi.ntnu.no> wrote: > > you may want to avoid this sort of indirection by using lists with named > components: > > d =

[R] how to separate char and num within a variable

2009-02-05 Thread Bill Hyman
Hi all, I read in a column which looks like "chr1:000889594-000889638", and need to break them into three columns like "chr1:", "000889594" and "000889638". How shall I do in R. Thanks a lot for your suggestions! Bill __ R-help@r-project.org mailing

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Fuchs Ira wrote: > >> I'm sure there is a more general way to ask this question but how do >> you use the elements of a character vector as names of objects in an >> expression? >> For example, say you have: >> >> a = c(1,3,5,7) >> b = c(2,4,6,8) >> >> n=c("a","b") >>

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
Murray Cooper wrote: > I am new to R, so maybe I'm missing the point of your question. But > why wouldn't you just use sum(a,b)? if you know you want to sum a and b, sure you would. if you need to sum the variables named by the components of some dynamic character vector, you need to lookup ('der

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
Fuchs Ira wrote: > I'm sure there is a more general way to ask this question but how do > you use the elements of a character vector as names of objects in an > expression? > For example, say you have: > > a = c(1,3,5,7) > b = c(2,4,6,8) > > n=c("a","b") > > and you want to use the names a and b in

Re: [R] eval and as.name

2009-02-05 Thread Murray Cooper
I am new to R, so maybe I'm missing the point of your question. But why wouldn't you just use sum(a,b)? Murray M Cooper, Ph.D. Richland Statistics 9800 N 24th St Richland, MI, USA 49083 Mail: richs...@earthlink.net - Original Message - From: "Fuchs Ira" To: Sent: Thursday, February 0

[R] eval and as.name

2009-02-05 Thread Fuchs Ira
I'm sure there is a more general way to ask this question but how do you use the elements of a character vector as names of objects in an expression? For example, say you have: a = c(1,3,5,7) b = c(2,4,6,8) n=c("a","b") and you want to use the names a and b in a function (e.g. sum) sum(eva

Re: [R] Incorrect p value for binom.test?

2009-02-05 Thread Albyn Jones
The computation 2*sum(dbinom(c(10:25),25,0.061)) does not correspond to any reasonable definition of p-value. For a symmetric distribution, it is fine to use 2 times the tail area of one tail. For an asymetric distribution, this is silly. The standard definition given in elementary texts is usual

Re: [R] subset problem (reducing from six to two levels)

2009-02-05 Thread Stephan Kolassa
Hi, does this help? http://www.nabble.com/factor-question-to18638814.html#a18638814 HTH, Stephan Ine schrieb: Hi all, I have got a seemingly simple problem (I am an R starter) with subsetting my data set, but cannot figure out the solution: I want to subset a data set from six to two levels,

Re: [R] subset problem (reducing from six to two levels)

2009-02-05 Thread Peter Dalgaard
Ine wrote: Hi all, I have got a seemingly simple problem (I am an R starter) with subsetting my data set, but cannot figure out the solution: I want to subset a data set from six to two levels, so that all analyses are done only with these two remaining levels. I tried TOTAL<-read.delim('total.c

Re: [R] subset problem (reducing from six to two levels)

2009-02-05 Thread Philipp Pagel
On Thu, Feb 05, 2009 at 01:01:59PM -0800, Ine wrote: > > Hi all, > I have got a seemingly simple problem (I am an R starter) with subsetting my > data set, but cannot figure out the solution: I want to subset a data set > from six to two levels, so that all analyses are done only with these two >

[R] subset problem (reducing from six to two levels)

2009-02-05 Thread Ine
Hi all, I have got a seemingly simple problem (I am an R starter) with subsetting my data set, but cannot figure out the solution: I want to subset a data set from six to two levels, so that all analyses are done only with these two remaining levels. I tried TOTAL<-read.delim('total.csv',header=T

Re: [R] Incorrect p value for binom.test?

2009-02-05 Thread Peter Dalgaard
Michael Grant wrote: I believe the binom.test procedure is producing one tailed p values rather than the two tailed value implied by the alternative hypothesis language. A textbook and SAS both show 2*9.94e-07 = 1.988e-06 as the two tailed value. As does the R summation syntax from R below. It

Re: [R] lattice key inside panel

2009-02-05 Thread Deepayan Sarkar
On Thu, Feb 5, 2009 at 11:28 AM, Dieter Menne wrote: > Deepayan Sarkar gmail.com> writes: > >> > One other thing that has so far eluded me is how to specify two >> > different kinds of symbols on a single column. The key above shows >> > >> > text line text rectangle >> > >> > but I would really

Re: [R] R system command on windows

2009-02-05 Thread Stephan Kolassa
?shell HTH, Stephan Aurelie Labbe, Dr. schrieb: Hi, I am trying to use the R command "system" under windows (XP). If I try the simple command system("mkdir toto") to create a directory toto, it tells me that it cannot find the command mkdir... Does anybody knows how it works ? Is it a path

Re: [R] R system command on windows

2009-02-05 Thread Uwe Ligges
Aurelie Labbe, Dr. wrote: Hi, I am trying to use the R command "system" under windows (XP). If I try the simple command system("mkdir toto") to create a directory toto, it tells me that it cannot find the command mkdir... Does anybody knows how it works ? Is it a path problem ? Maybe the a

[R] R command system under Windows

2009-02-05 Thread Aurelie Labbe, Dr.
Hi, I am trying to use the R command "system" under windows (XP). If I try the simple command system("mkdir toto") to create a directory toto, it tells me that it cannot find the command mkdir... Does anybody knows how it works ? Is it a path problem ? Maybe the answer is simple: I am a R us

[R] R system command on windows

2009-02-05 Thread Aurelie Labbe, Dr.
Hi, I am trying to use the R command "system" under windows (XP). If I try the simple command system("mkdir toto") to create a directory toto, it tells me that it cannot find the command mkdir... Does anybody knows how it works ? Is it a path problem ? Maybe the answer is simple: I am a R us

[R] pdata.frame for panel data

2009-02-05 Thread ele . fanti
Hi there, as a newbie in R I have a question on the plm package for panel data: How do I actually manage to get data into the pdata.frame format? i.e. how do I declare id and time? I already tried various things and got even more error messages. for example > country <- > c("AGO","BWA","DRC","

[R] Incorrect p value for binom.test?

2009-02-05 Thread Michael Grant
I believe the binom.test procedure is producing one tailed p values rather than the two tailed value implied by the alternative hypothesis language. A textbook and SAS both show 2*9.94e-07 = 1.988e-06 as the two tailed value. As does the R summation syntax from R below. It looks to me like the a

Re: [R] seq(along= surprise

2009-02-05 Thread baptiste auguie
Perhaps this is what was intended? sims <- list(length=100) do.call(seq, sims) seq by itself does not expect a list, but do.call() can create the appropriate call if a list is what you want to pass to the function. Hope this helps, baptiste On 5 Feb 2009, at 19:46, Uwe Ligges wrote:

[R] pdata.frame for panel data

2009-02-05 Thread ele . fanti
Hi there, as a newbie in R I have a question on the plm package for panel data: How do I actually manage to get data into the pdata.frame format? i.e. how do I declare id and time? I already tried various things and got even more error messages. for example > country <- > c("AGO","BWA","DRC","

Re: [R] seq(along= surprise

2009-02-05 Thread Uwe Ligges
Uwe Ligges wrote: Kjetil Halvorsen wrote: This surprised me: reps <- 100 sims <- list(length=reps) sims $length [1] 100 for(i in seq(along=sims))print(i) [1] 1 This is R 2.8.1. What is surprising? sims is now a list that contains 1 element called "length" with a numeric value of

[R] Legend for radial.plot?

2009-02-05 Thread Jason Rupert
Using plotrix, is it possible to create a legend for the following and attach it to the radial.plot?   posmat<-matrix(sample(2:9,30,TRUE),nrow=3) radial.plot(posmat,labels=paste("X",1:10,sep=""),rp.type="p",   main="Spiderweb plot",line.col=2:4,show.grid=FALSE,lwd=1:3,   radial.lim=c(0,10))   Th

Re: [R] Reading images

2009-02-05 Thread Jorge Ivan Velez
Hi there, Take a look at this: http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/rimage/html/read.jpeg.html HTH, Jorge On Thu, Feb 5, 2009 at 1:01 PM, gabo wrote: > Hi > > Can anyone tell me how to convert an image file (a jpg file for instance) > into a matrix file? > > The command image(bla

Re: [R] seq(along= surprise

2009-02-05 Thread Uwe Ligges
Kjetil Halvorsen wrote: This surprised me: reps <- 100 sims <- list(length=reps) sims $length [1] 100 for(i in seq(along=sims))print(i) [1] 1 This is R 2.8.1. What is surprising? sims is now a list that contains 1 element called "length" with a numeric value of 100. Then seq(along=

Re: [R] maptools: Test if point is in polygon

2009-02-05 Thread Renaud Lancelot
See function pip (point in polygon) in package splancs. Renaud 2009/2/5 Rainer M Krug > On Thu, Feb 5, 2009 at 3:21 PM, Aleksandr Andreev > wrote: > > In R's maptools package, is there a built-in function to test if a > > given point is "inside" a given polygon on the map? The map was > > loa

Re: [R] Reading images

2009-02-05 Thread Sarah Goslee
There's lots of info in the mailing list archives on this topic - 2 minutes with google would have gotten you to read.jpeg and saved you some time. Sarah On Thu, Feb 5, 2009 at 1:01 PM, gabo wrote: > Hi > > Can anyone tell me how to convert an image file (a jpg file for instance) > into a matrix

Re: [R] lattice key inside panel

2009-02-05 Thread Dieter Menne
Deepayan Sarkar gmail.com> writes: > > One other thing that has so far eluded me is how to specify two > > different kinds of symbols on a single column. The key above shows > > > > text line text rectangle > > > > but I would really like to get > > > > text line > > text rectangle > > > > but th

Re: [R] Unexpected mfrow, layout behavior (pdf still has multiple pages)

2009-02-05 Thread Paul Johnston
You are correct, thank you. I added a new subsection 'Graphics Devices' in http://wiki.r-project.org/rwiki/doku.php?id=tips:surprises:traps to document this behavior. Paul On Thu, Feb 5, 2009 at 4:58 AM, Peter Dalgaard wrote: > Paul Johnston wrote: >> My goal is to create a graph with one column

[R] seq(along= surprise

2009-02-05 Thread Kjetil Halvorsen
This surprised me: > reps <- 100 > sims <- list(length=reps) > sims $length [1] 100 > for(i in seq(along=sims))print(i) [1] 1 > This is R 2.8.1. Kjetil [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.et

Re: [R] Non-linear optimisation

2009-02-05 Thread Ravi Varadhan
Hi, I don't understand your Matlab code. However, let me say this: - you could use "L-BFGS-B" algorithm in optim() or nlminb(), if you only have box constraints - you could use ConstrOptim(), if you only have linear inequality constraints - you could use Rdonlp2 if you have more general eq

Re: [R] See source code for survplot function in Design package

2009-02-05 Thread David M Smith
Uwe Ligges actually had a nice write-up on finding source code for functions like this in R-news a couple of years ago. You can find it here: http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf (see p44) There are some other tips for finding R source code here: http://blog.revolution-computing.

Re: [R] Target Plot?

2009-02-05 Thread Jason Rupert
I had a bit of problems with my email, so if any one responded to this I may have not received it.    Is there any chance you can repost any ideas you might have?   Right now I am looking at the plotrix package, but I have not been able to put together what I'm looking for.   Thank you again f

Re: [R] See source code for survplot function in Design package

2009-02-05 Thread Marc Schwartz
on 02/05/2009 10:54 AM Eleni Rapsomaniki wrote: > Dear R users, > > I know one way to see the code for a hidden function, say function_x, is > using default.function_x (e.g. summary.default). But how can I see the > code for imported packages that have no namespace (in this case Design)? > > Many

Re: [R] See source code for survplot function in Design package

2009-02-05 Thread Frank E Harrell Jr
Eleni Rapsomaniki wrote: Dear R users, I know one way to see the code for a hidden function, say function_x, is using default.function_x (e.g. summary.default). But how can I see the code for imported packages that have no namespace (in this case Design)? Many Thanks Eleni > methods(survpl

Re: [R] See source code for survplot function in Design package

2009-02-05 Thread Dieter Menne
Eleni Rapsomaniki mail.cryst.bbk.ac.uk> writes: > I know one way to see the code for a hidden function, say function_x, > is using default.function_x (e.g. summary.default). But how can I see > the code for imported packages that have no namespace (in this case > Design)? Just type the nam

[R] Reading images

2009-02-05 Thread gabo
Hi Can anyone tell me how to convert an image file (a jpg file for instance) into a matrix file? The command image(blabla) transforms a matrix into an image file, I am searching exactly the inverse. Thanks... [[alternative HTML version deleted]]

[R] Non-linear optimisation

2009-02-05 Thread ehxpieterse
Hi there, I have a piece of Matlab code I use to optimise a trding strategy. If there are any Matlab/R specialists out there, I would appreciate your help in doing the exact same optimisation in R. I suspect I would use nlm() in R but am not sure where to define my constraints. I have attached

[R] liknage analysis

2009-02-05 Thread Federico Calboli
Dear All, is there a package in R that implements parametric and non parametric genetic linkage analysis (with both case/control or quantitative phenos)? I tried using Merlin, which could not deal with pedigrees the size I have, and SimWalk2 does not look like the answer either --for insta

[R] ThinkCell type waterfall charts in R?

2009-02-05 Thread Millo Giovanni
Hello Kerstin, I had done something like this in the past but can't find it any more, so I've put up a very raw example you might want to sophisticate upon. The idea is that of drawing an empty high-level plot and then putting some low-level elements (mainly bars and connecting lines) into it ac

Re: [R] Numeric class and sasxport.get

2009-02-05 Thread Frank E Harrell Jr
Sebastien Bihorel wrote: Ok, just so as I get that straight, is the 'labelled' class something that you created in your package or a readily available class in base R? It's something we added for the Hmisc package. Signing off, Frank *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen C

Re: [R] Sweave and \Sexpr{}

2009-02-05 Thread Dieter Menne
Felipe Carrillo yahoo.com> writes: > It is working now although I still have to specify the path to Sweave.sty \usepackage{C:/R/R-2.8.1/share/texmf/Sweave} > and it doesn't evaluate \Sexpr{} when I simply use \usepackage{Sweave}. I placed Sweave.sty in the same > folder where my rnw and tex file

Re: [R] How do I get my IT department to "bless" R?

2009-02-05 Thread Christian Langkamp
I know on the website there are some pretty reputable sponsors of the software who at some stage donated some (presumably significant) amount of money out of thankfulness because some project worked and the software helped in some way. In order to push however the use of that software, might it n

[R] Does the "labpt" object in the Polygons-class represent the centroid of the polygon

2009-02-05 Thread Rizzo . Michael
Hello, I need to calculate the centroids of some spatial polygons that I have placed into a Polygons-class object. Is the labeling point in the Polygons-class the centroid of the polygon? Thank you for your help. __ R-help@r-project.org mailing list

[R] See source code for survplot function in Design package

2009-02-05 Thread Eleni Rapsomaniki
Dear R users, I know one way to see the code for a hidden function, say function_x, is using default.function_x (e.g. summary.default). But how can I see the code for imported packages that have no namespace (in this case Design)? Many Thanks Eleni ___

Re: [R] Sweave and \Sexpr{}

2009-02-05 Thread Felipe Carrillo
Thaks Eric and Dieter: It is working now although I still have to specify the path to Sweave.sty \usepackage{C:/R/R-2.8.1/share/texmf/Sweave} and it doesn't evaluate \Sexpr{} when I simply use \usepackage{Sweave}. I placed Sweave.sty in the same folder where my rnw and tex file reside. --- On T

Re: [R] R-help Digest, Vol 72, Issue 3

2009-02-05 Thread Charles Geyer
> Date: Mon, 2 Feb 2009 12:56:15 +0100 > From: friedrich.lei...@stat.uni-muenchen.de > Subject: Re: [R] Problems in Recommending R > To: thomas.petzo...@tu-dresden.de > Cc: "r-help@r-project.org" , > user-2...@r-project.org,p...@stat.auckland.ac.nz > Message-ID: <18822.57183.637787.42

[R] Suppressing output in Garch estimation

2009-02-05 Thread Shimrit Abraham
HI, I'm calling the garch() function several times within a for-loop and I would like to suppress the output that the function generates. Setting garch.control(trace = F) does not seem to help. Any suggestions on how to solve this problem? Thanks, S.A. [[alternative HTML version deleted

Re: [R] A way to "lock down" the order of bars for ggplot "dodged"histogram

2009-02-05 Thread Jason Rupert
Thierry,   Thank you for such a quick response.   I changed the code, but I seem to get the same response.  Ugh.  Maybe I am missing a step.  Thank you again for any feedback.   Me_df<-data.frame(Data = c(1:15), Person = "Me") You_df<-data.frame(Data = c(10:20), Person = "You") Them_df<-data.fr

Re: [R] optimal control, maximization with several variables?

2009-02-05 Thread Ravi Varadhan
I assume that you are looking to solve, in R, the constrained optimization problem: H (u1, u2) = a*u1+b*u2+c*f1(u2)+lambda*(x') with constraints: 0 Date: Thursday, February 5, 2009 8:47 am Subject: [R] optimal control, maximization with several variables? To: R-help@r-project.org >

[R] tm Module in R

2009-02-05 Thread ryan
__ 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 and provide commented, minimal, self-contained, reproducible code.

[R] sqlQuery problem

2009-02-05 Thread stenka1
__ 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 and provide commented, minimal, self-contained, reproducible code.

Re: [R] Chi-squared test adjusted for multiple comparisons? Harbe'stest?

2009-02-05 Thread Murray Cooper
Categorical data analysis is definitely the way you want to go. Which test you use depends on how you are going to use the results. For "quick and dirty" I would suggest using Fisher's exact test on all 2x2 submatricies of counts. In this case, with 4 treatments you have 6 possible 2x2 submatrici

Re: [R] A way to "lock down" the order of bars for ggplot "dodged"histogram

2009-02-05 Thread ONKELINX, Thierry
Dear Jason, Convert Person to a factor with the levels in the order that you want. Group_df$Person <- factor(Group_df$Person, levels = c("Them", "You", "Me")) HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur-

Re: [R] The Origins of R

2009-02-05 Thread Murray Cooper
Consider yourself lucky! I'm sure there are many people who would prefer not to see their name in the NYT. ;-) Murray Coooper - Original Message - From: "Duncan Murdoch" To: "Mark Difford" Cc: Sent: Thursday, February 05, 2009 10:16 AM Subject: Re: [R] The Origins of R On 2/5/200

Re: [R] split dataset randomly in prediction and validation set

2009-02-05 Thread Dieter Menne
Els Verfaillie ugent.be> writes: > For a geostatistical analysis, I would like to split my dataset randomly > into 2 parts: a prediction set (with 2/3 of my data) and a validation set > (with 1/3 of my data). Both datasets will thus contain different data. Any > suggestions? Normally, you will

[R] A way to "lock down" the order of bars for ggplot "dodged" histogram

2009-02-05 Thread Jason Rupert
It appears that ggplot reorder the data for a "dodged" histogram based on whether or not a specific variable has a value in the first bin.   I would like to be able to absolutely force the order of the variables in the bin.  For example, say I have three variables Me, You, and Them.   Me_df<-da

Re: [R] The Origins of R

2009-02-05 Thread Roy Mendelssohn
Can we give this a rest (or take it offline)? This is the R-Help mail list, and I fail to grasp how anyone is being helped to use R by this endless discussion. -Roy M. ** "The contents of this message do not reflect any position of the U.S. Government or NOAA."

Re: [R] change individual label colours in a cluster plot?

2009-02-05 Thread Jim Ottaway
> patricia garcía gonzález writes: > Hi, > If you have a variable, that defines what you want to differentiate > (sociology, economics etc.) then you can add color depending on the > value of that variable. You will have to convert it to numeric if it is > not. An example would be > plot( i

Re: [R] The Origins of R

2009-02-05 Thread Mark Difford
Duncan Murdoch wrote: >> So I'm not complaining, but the main problem I saw in his article was >> that it didn't mention me. I knew Robert Gentleman (even had an office >> next to him!) before he started R: surely that must have been a key >> influence. I am sorry to hear that. If I underst

Re: [R] eliminating control characters from formatted data files

2009-02-05 Thread David Epstein
Murray Cooper wrote: > > This may be a case of "If all you have is a hammer, everything looks like > a > nail". > If all you want to do is remove the last line if it contains a CONTROL-Z, > why > not use something like perl to process the files? > My first thought was to use perl, and this w

Re: [R] The Origins of R

2009-02-05 Thread Duncan Murdoch
On 2/5/2009 1:05 AM, Mark Difford wrote: I think that all appeared on January 8 in Vance's blog posting, with a comment on it by David M Smith on Jan 9. So those people have -27 days Then there was no need for vituperative comments (not from you, of course): simply point doubters to the right

Re: [R] maptools: Test if point is in polygon

2009-02-05 Thread Rainer M Krug
On Thu, Feb 5, 2009 at 3:21 PM, Aleksandr Andreev wrote: > In R's maptools package, is there a built-in function to test if a > given point is "inside" a given polygon on the map? The map was > loaded from an ESRI Shapefile. The point's latitude and longitude are > known. If everything else fail

Re: [R] maptools: Test if point is in polygon

2009-02-05 Thread baptiste auguie
I don't know about the maptools package but one general way to do this would be to compute the convex hull (?chull) of the augmented set of points and test if the point belongs to it. Hope this helps, baptiste On 5 Feb 2009, at 13:21, Aleksandr Andreev wrote: In R's maptools package, i

Re: [R] change individual label colours in a cluster plot?

2009-02-05 Thread patricia garcía gonzález
Hi, If you have a variable, that defines what you want to differentiate (sociology, economics etc.) then you can add color depending on the value of that variable. You will have to convert it to numeric if it is not. An example would be plot( iris[ , 1 ], iris[ , 2], col = iris[ , 3 ] ) Re

Re: [R] overlay plot question

2009-02-05 Thread Doran, Harold
Did you want something like this: library(lattice) x <- plogis(.x, location=0, scale=1) y <- plogis(.x, location=2, scale=4) xvals <- seq(-7.6, 7.6, length=100) xyplot(x+y ~ xvals, type = c("g", "l")) > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r

[R] Three questions about DSE

2009-02-05 Thread Rebecca Sela
I have been using the dse1 and dse2 packages to estimate a model in which the underlying state is an ARMA(2,2) and the observed variables are equal to the state plus noise. I am describing this model using a state space model. First, in estimation, is there a way to restrict two of the estimate

[R] change individual label colours in a cluster plot?

2009-02-05 Thread Jim Ottaway
I am doing some bibliometric analysis of interdisciplinarity using cluster analysis of co-authorship. I'd like to be able to specify the colour of individual authors in the labels to show a prior grouping by discipline (red for sociology authors, blue for economics authors, ..., that sort of thing

Re: [R] Problems in Recommending R

2009-02-05 Thread hadley wickham
On Thu, Feb 5, 2009 at 8:32 AM, hadley wickham wrote: >> > I don't think you should completely rule out javascript. It's >> > possible to use it in ways that add to the utility of a page, while >> > not detracting from it if not available. >> >> OK, what particularly do you have in mind? Some

Re: [R] Problems in Recommending R

2009-02-05 Thread hadley wickham
> > I don't think you should completely rule out javascript. It's > > possible to use it in ways that add to the utility of a page, while > > not detracting from it if not available. > > OK, what particularly do you have in mind? Here's a few of examples off the top of my head. These are thin

  1   2   >