Re: [R] ggplot2: geom_errorbarh()

2009-07-17 Thread Benoit Boulinguiez
when I use size, it sets the global size of the whiskers (I'd rather say the thickness of the line) but for sure it does not set the width of the whisker. Try to use the option 'width' with errorbar() not errorbarh(), you'll see that it works perfectly, it sets the width of the whisker. It just do

[R] Remembering a value in multiple calls of a function

2009-07-17 Thread Saptarshi Guha
Hello, I tried this pseudo-generator style experiment (see below). The "<<-" operator assigns to in the calling environment which would be the environment of "getN". Yet when the function incr is returned, isn't this environment lost? Also the print displays GlobalEnv, yet the globalenv does not h

Re: [R] Renviron.in error when compiling R 2.9.1 under Debian.

2009-07-17 Thread Dirk Eddelbuettel
Milton, On 16 July 2009 at 18:08, milton ruser wrote: | I'm trying to compile R 2.9.1 on my home directory under debian, | and as I need to play with RPy, I tryed compile R using: To use RPy on Debian (or Ubuntu) you can also just try sudo apt-get install python-rpy which has been available

Re: [R] Problems generating image from tiff file

2009-07-17 Thread Paul Hiemstra
Hi Mehdi, PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. I don't mean to rude, but you seem to lack basic knowledge regarding the use of spatial data in R. Starting to use R is hard, but please ask

Re: [R] Remembering a value in multiple calls of a function

2009-07-17 Thread Douglas Bates
On Fri, Jul 17, 2009 at 9:15 AM, Saptarshi Guha wrote: > Hello, > I tried this pseudo-generator style experiment (see below). The "<<-" > operator assigns to in the calling environment which would be the > environment of  "getN". Yes. > Yet when the function incr is returned, isn't this environme

Re: [R] Getting the C-index for a dataset that was not used to generate the logistic model

2009-07-17 Thread Kyle Werner
Professor Harrell, Thanks for your lightning-fast reply. It was extremely helpful, and pointed me exactly to where I needed to go to solve my problem. For others reading, my problem was that I was incorrectly dealing with the validation data. I tried to do this to generate predictions from a pre

Re: [R] Remembering a value in multiple calls of a function

2009-07-17 Thread Bill.Venables
'startgiven' is in the environment of your function 'incr' (which is what your function 'a' becomes). It might be more transparent to define your function with an enclosing local environment explicitly, for example: > b <- local({ + startgiven <- 0 + function(n) { + if(!missing(n)) { +

[R] how to evaluate character vector within pnorm()

2009-07-17 Thread Thomas Roth (geb. Kaliwe)
Hi, I'm trying to evaluate a character vector within pnorm. I have a vector with values and names x = c(2,3) names(x) = c("mean", "sd") so that i tried the following temp = paste(names(x), x, sep = "=") #gives #> temp #[1] "mean=2" "sd=3" #Problem is that both values 2 and 3 are taken as v

Re: [R] Remembering a value in multiple calls of a function

2009-07-17 Thread Saptarshi Guha
Thanks to all for the helpful explanation. Regards Saptarshi On Fri, Jul 17, 2009 at 12:42 AM, wrote: > 'startgiven' is in the environment of your function 'incr' (which is what > your function 'a' becomes).  It might be more transparent to define your > function with an enclosing local environ

Re: [R] how to evaluate character vector within pnorm()

2009-07-17 Thread ONKELINX, Thierry
Dear Thomas, You don't need parse() X <- c(mean = 2, sd = 3) pnorm(0, mean = X["mean"], sd = X["sd"]) Have a look at library(fortunes) fortune(106) HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en boso

Re: [R] how to evaluate character vector within pnorm()

2009-07-17 Thread Bill.Venables
Here is one way: x <- c(2,3) names(x) <- c("mean", "sd") do.call(pnorm, c(list(0), as.list(x))) Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Thomas Roth (geb. Kaliwe

[R] Solving two nonlinear equations and two knowns

2009-07-17 Thread yhsu6
Dear R users, I have two nonlinear equations, f1(x1,x2)=0 and f2(x1,x2)=0. I try to use optim command by minimize f1^2+f2^2 to find x1 and x2. I found the optimal solution changes when I change initial values. How to solve this? BTW, I also try to use grid searching. But I have no information o

Re: [R] Solving two nonlinear equations with two knowns

2009-07-17 Thread Berend Hasselman
yhsu6 wrote: > > Dear R users, > > I have two nonlinear equations, f1(x1,x2)=0 and f2(x1,x2)=0. I try to use > optim command by minimize f1^2+f2^2 to find x1 and x2. I found the optimal > solution changes when I change initial values. How to solve this? > > BTW, I also try to use grid search

Re: [R] curve from a formula with ggplot2

2009-07-17 Thread Benoit Boulinguiez
Hi, It works perfectly! Though I'm still stuck on the height of the whiskers with errorbarh() :) Regards/Cordialement Benoit Boulinguiez -Message d'origine- De : hadley wickham [mailto:h.wick...@gmail.com] Envoyé : dimanche 12 juillet 2009 11:09 À : Benoit Boulinguiez Cc : r-help@r-

[R] Package norm has been removed. What to use for Maximum Likelihood Missing Data Imputation?

2009-07-17 Thread Daniel Abbott
Hello, I apologize if an answer to my questions is available, or if I submitted this question incorrectly. I have read the mailing lists, as well as the R Project and CRAN homepages. However, I may have missed something. I noticed the package 'norm' has been removed. Its page http://cran.r-projec

Re: [R] Package norm has been removed. What to use for Maximum Likelihood Missing Data Imputation?

2009-07-17 Thread Uwe Ligges
The package is ORPHANED (i.e. no active maintainer) and does not pass the checks for recent versions of R anymore. If you think the package is very useful for you, you may want to become its new active maintainer. Just take the sources from the archive, fix and update the package as you like and

Re: [R] DataFrame help

2009-07-17 Thread Uwe Ligges
Don MacQueen wrote: As others noted, you can use the built in function colSums, but you said you're writing your own. Given what you've got so far, that makes the issue one of structuring the output. Try csum <- function(m) { a = data.frame(m) s = lapply(a,sum) unlist(s) } lapp

Re: [R] Package norm has been removed. What to use for Maximum Likelihood Missing Data Imputation?

2009-07-17 Thread Daniel Abbott
I appreciate the info! I am mostly interested with ML missing data imputation. Is there another R module which has such a function that is well regarded? Thank you. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

Re: [R] Package norm has been removed. What to use for Maximum Likelihood Missing Data Imputation?

2009-07-17 Thread Achim Zeileis
On Fri, 17 Jul 2009, Daniel Abbott wrote: Hello, I apologize if an answer to my questions is available, or if I submitted this question incorrectly. I have read the mailing lists, as well as the R Project and CRAN homepages. However, I may have missed something. I noticed the package 'norm' ha

Re: [R] Transformation of data!

2009-07-17 Thread Michael Knudsen
On Fri, Jul 17, 2009 at 10:29 AM, Andriy Fetsun wrote: > I want to perform some sort of transformation on all the > elements in the matrix I have posted and that I have only presented > those 3 elements as an example of how the transformation will affect > those 3 elements. > > Do you see the prob

Re: [R] ggplot2: geom_errorbarh()

2009-07-17 Thread hadley wickham
I am still failing to understand exactly what you want to set. Maybe you want to set the height of the whiskers? Hadley On Fri, Jul 17, 2009 at 9:07 AM, Benoit Boulinguiez wrote: > when I use size, it sets the global size of the whiskers (I'd rather say the > thickness of the line) but for sure

Re: [R] Package norm has been removed. What to use for Maximum Likelihood Missing Data Imputation?

2009-07-17 Thread Uwe Ligges
Achim Zeileis wrote: On Fri, 17 Jul 2009, Daniel Abbott wrote: Hello, I apologize if an answer to my questions is available, or if I submitted this question incorrectly. I have read the mailing lists, as well as the R Project and CRAN homepages. However, I may have missed something. I not

Re: [R] Weibull Prediction?

2009-07-17 Thread David Winsemius
On Jul 17, 2009, at 12:52 AM, Sean Brummel wrote: > This conversation is digressing... Here is my question, what does > the value from the predict function mean? AS STATED IN MY CODE. Try > running the example that I gave. > > predict(model,type=c("response"))[1]=? Look at the help

Re: [R] SOLVED: how to evaluate character vector within pnorm()

2009-07-17 Thread Thomas Roth (geb. Kaliwe)
That what i was looking for :-) bill.venab...@csiro.au schrieb: Here is one way: x <- c(2,3) names(x) <- c("mean", "sd") do.call(pnorm, c(list(0), as.list(x))) Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: r-help-boun...@r-project.org [mailto

[R] pass an array from a perl script to a R script

2009-07-17 Thread xin liu
Hi, All, Many thanks for letting me know there is no references and dereferencing in R, but I saw a library called (ref) on cran, but when I use library(ref), I was told there is no such library in R. So if I can not passing an array from a perl script to a R script by its reference, how to

[R] Count data categories from table

2009-07-17 Thread Miroslav Nikolov
Hi there, I have a relatively simple question, though, I couldn't find a solution for it so far. I have a table with 1000 entries and columns containing information about different parameters for each entry. What I want to do is group all parameters from one of the columns [e.g. if all 1000 entri

Re: [R] Package norm has been removed. What to use for Maximum L

2009-07-17 Thread Ted Harding
On 17-Jul-09 12:12:01, Uwe Ligges wrote: > Achim Zeileis wrote: >> On Fri, 17 Jul 2009, Daniel Abbott wrote: >>> Hello, >>> I apologize if an answer to my questions is available, or if I >>> submitted this question incorrectly. I have read the mailing lists, >>> as well as the R Project and CRAN ho

Re: [R] Count data categories from table

2009-07-17 Thread David Winsemius
On Jul 17, 2009, at 5:47 AM, Miroslav Nikolov wrote: Hi there, I have a relatively simple question, though, I couldn't find a solution for it so far. I have a table with 1000 entries and columns containing information about different parameters for each entry. What I want to do is group al

Re: [R] Package norm has been removed. What to use for Maximum L

2009-07-17 Thread Ted Harding
Follow-up: On 17-Jul-09 12:38:27, Ted Harding wrote: > On a point of information: The licence in question: > > License: The software may be distributed free of charge and used > by anyone if credit is given. It has been tested fairly > well, but it comes with no guarantees and t

Re: [R] pass an array from a perl script to a R script

2009-07-17 Thread David Winsemius
On Jul 17, 2009, at 4:44 AM, xin liu wrote: Hi, All, Many thanks for letting me know there is no references and dereferencing in R, but I saw a library called (ref) on cran, but when I use library(ref), I was told there is no such library in R. An error from that function may indicate t

Re: [R] Package norm has been removed. What to use for Maximum L

2009-07-17 Thread Gabor Grothendieck
On Fri, Jul 17, 2009 at 8:54 AM, Ted Harding wrote: > Follow-up: > > On 17-Jul-09 12:38:27, Ted Harding wrote: >> On a point of information: The licence in question: >> >> License: The software may be distributed free of charge and used >>          by anyone if credit is given. It has been tested f

Re: [R] Package norm has been removed. What to use for Maximum L

2009-07-17 Thread Ted Harding
On 17-Jul-09 13:01:46, Gabor Grothendieck wrote: > On Fri, Jul 17, 2009 at 8:54 AM, Ted > Harding wrote: >> Follow-up: >> >> On 17-Jul-09 12:38:27, Ted Harding wrote: >>> On a point of information: The licence in question: >>> >>> License: The software may be distributed free of charge and used >>>

Re: [R] Count data categories from table

2009-07-17 Thread John Kane
aggregate? Something like this should work although it is not very elegant. mydata <- data.frame(aa=rep(letters[1:10],2), bb=rnorm(20, 5,1)) ss <- aggregate(mydata[,2],list(aa=mydata$aa), sum) pie(ss[,2]) ===

Re: [R] dse model setup help

2009-07-17 Thread Paul Gilbert
I think the problem here is that you seem to be trying to specify a non-innovations form model, for which both Q and R need to be specified, but you have only specified Q. The code guesses whether you are specifying an innovations model or an non-innovations model based on whether you specify

Re: [R] Entire Organization Switching from SAS to R - Any experience?

2009-07-17 Thread Mike Prager
Kel Lam wrote: > My institute has been heavily dependent on SAS for the past while, and > SAS is starting to charge us a very deep amount for license renewal. > Since we are a non-profit organization that is definitely not > sustainable. The team is brainstorming possibility of switching to R, >

[R] Solving two nonlinear equations with two knowns

2009-07-17 Thread yhsu6
--- Begin Message --- My question is as follows Y~N(mu2,sigma2^2), i.e. Y has cdf F2 X generates from: X=F2^{-1}(u)+a*|u-tau|^b*I(u>0.75), where u~U(0,1) Given tau=0.75, I want to find a and b such that E(X)-E(Y)=2 and Var(X)/Var(Y)=3 I try optim and grid seaching and get different results,

Re: [R] Solving two nonlinear equations with two knowns

2009-07-17 Thread yhsu6
My question is as follows Y~N(mu2,sigma2^2), i.e. Y has cdf F2 X generates from: X=F2^{-1}(u)+a*|u-tau|^b*I(u>0.75), where u~U(0,1) Given tau=0.75, I want to find a and b such that E(X)-E(Y)=2 and Var(X)/Var(Y)=3 I try optim and grid seaching and get different results, any solution? T

Re: [R] Passing additional arguments through '...'

2009-07-17 Thread escher2079
Thanks everyone for your suggestions, they've been very helpful. I think I've just about solved my problem, but not quite yet. As suggested, I've used sys.call and match.call. Here is what I have so far: fun.tester <- function(abc,def,ghi,jkl,...){ mf <- match.call(expand.dots = FALSE) sc <- sy

[R] R: extract data.frames from a list

2009-07-17 Thread Angel Spassov
Dear useRs and developeRs, I am struggling with a simple but not obviously solvable issue. Suppose I have the following list of data.frames called 'tmp': a <- data.frame(a=rnorm(10),b=letters[1:10]) (tmp <- list(a,a[1:4,],a[1:7,])) It is known that all data.frames in this list have the same numb

[R] Arules questions. I need some help please

2009-07-17 Thread Alberto Lora M
Question 2a) I am also working with arules package and I have the following problem let suppose the matrix b like: b<-matrix(c(1,1,1,1,1,1,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1),nrow=6) rownames(b)=c("T1", "T2", "T3", "T4", "T5", "T6") colnames(b)=c("It1", "It2", "It3", "It4") bt<-as(b, "transactions

Re: [R] Plotting hourly time-series data loaded from file using plot.ts

2009-07-17 Thread Keith
Yep, it's my mistake while manipulating the data. Now it works fine except there is a warning message coming out: Warning message: In zoo(rval, ix) : some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique I checked the faq and some other documents, it seems

[R] How to do adjust for sex, age, genotype for a data

2009-07-17 Thread 1Rnwb
Hello R gurus, I am biologist doing biomarker research and I have a data set where I have 6 proteins and close to 3000 samples, i have to look for differences between disease(Y) and controls(N) along with genetic risk, genotypes, sex and other demographic info available. however i do not know any

Re: [R] R: extract data.frames from a list

2009-07-17 Thread baptiste auguie
try this, do.call(rbind, tmp) baptiste 2009/7/17 Angel Spassov > Dear useRs and developeRs, > > I am struggling with a simple but not obviously solvable issue. Suppose I > have the following list of data.frames called 'tmp': > > a <- data.frame(a=rnorm(10),b=letters[1:10]) > (tmp <- list(a,a[1

Re: [R] R: extract data.frames from a list

2009-07-17 Thread Henrique Dallazuanna
do.call(rbind, tmp) On Fri, Jul 17, 2009 at 10:55 AM, Angel Spassov wrote: > Dear useRs and developeRs, > > I am struggling with a simple but not obviously solvable issue. Suppose I > have the following list of data.frames called 'tmp': > > a <- data.frame(a=rnorm(10),b=letters[1:10]) > (tmp <- l

Re: [R] How to do adjust for sex, age, genotype for a data

2009-07-17 Thread Frank E Harrell Jr
1Rnwb wrote: Hello R gurus, I am biologist doing biomarker research and I have a data set where I have 6 proteins and close to 3000 samples, i have to look for differences between disease(Y) and controls(N) along with genetic risk, genotypes, sex and other demographic info available. however i d

Re: [R] Entire Organization Switching from SAS to R - Any experience?

2009-07-17 Thread Kelvin Lam
I should elaborate the situation a bit more. We store our data in UNIX and have been using UNIX SAS for our work. My Biostat dept has 40 SAS users from which at most 10 also use R. The Epi/Grad Students/Investigators combine for another 30-40 not-so-frequent SAS users let alone R. So we are ta

Re: [R] R: extract data.frames from a list

2009-07-17 Thread Angel Spassov
Right on target! Very appreciated. Thanks. Cheers, AS On Fri, Jul 17, 2009 at 4:39 PM, Henrique Dallazuanna wrote: > do.call(rbind, tmp) > > On Fri, Jul 17, 2009 at 10:55 AM, Angel Spassov > wrote: > >> Dear useRs and developeRs, >> >> I am struggling with a simple but not obviously solvable is

Re: [R] Plotting hourly time-series data loaded from file using plot.ts

2009-07-17 Thread Gabor Grothendieck
Need reproducible code and data to respond. As per the last line to every message in r-help, reduce the file to the smallest subset that exhibits the error and post it with self contained code that will read it in and reproduce the error message. On Fri, Jul 17, 2009 at 10:29 AM, Keith wrote: > Y

Re: [R] Help with Conditional Logit

2009-07-17 Thread Charles C. Berry
On Thu, 16 Jul 2009, Noah Silverman wrote: Thanks for the quick reply. I found that page and do have the survival package installed. My problem is that I don't understand a few things: 1) What do I input for the "formula" field? (In RapidMiner, the functions don't have this input.) 2)

Re: [R] Passing additional arguments through '...'

2009-07-17 Thread escher2079
Thanks for your suggestions, they were quite helpful. I've just about solved the problem, but now I just need to know where the additional arguments passed through '...' are stored (in order to make my own matching scheme I need to be able to change the value of those to the correct values upon en

Re: [R] Question regarding package submission to CRAN

2009-07-17 Thread Vikneswaran Gopal
It usually gets uploaded within a day if it passes all the checks run by Kurt Hornik. Then the Windows version gets built within the next 24 hours as well. Vik Jim Lemon wrote: > Gates, Michael wrote: >> ... >> Members, >> I recently submitted my first package to the submissions ftp site o

Re: [R] Passing additional arguments through '...'

2009-07-17 Thread Charles C. Berry
On Fri, 17 Jul 2009, escher2079 wrote: Thanks for your suggestions, they were quite helpful. I've just about solved the problem, but now I just need to know where the additional arguments passed through '...' are stored (in order to make my own matching scheme I need to be able to change the va

[R] Fisher's exact test

2009-07-17 Thread James Allsopp
Hi, I'm trying to run Fisher's Exact test on the data below, but I'm not sure how interpret the data shown. Can someone tell me what this is saying? Looking at the numbers it should be that there's no significant difference between the HDL and LDL, but a p-value of 1 seems high. Is the low value in

Re: [R] Passing additional arguments through '...'

2009-07-17 Thread escher2079
Fair enough. I'm not going to post all the code because it's distracting, but the following example function is demonstrative of the problem: exfun<-function(...){ print(x) } I'm aware that leaving making the only inputs additional arguments is bad form, but this is merely an example. So here i

[R] log error for use on axis

2009-07-17 Thread NDC/jshipman
Hi, I am new to R plot. I am trying to scale my y axis in log. When I do this I receive the following error Error in axis(side = side, at = at, labels = labels, ...) : CreateAtVector [log-axis()]: axp[0] = 0 < 0! In addition: Warning messages: 1: In plot.window(...) : nonfinite axis lim

Re: [R] Fisher's exact test

2009-07-17 Thread Dieter Menne
James Allsopp-2 wrote: > > Hi, > I'm trying to run Fisher's Exact test on the data below, but I'm not > Bound Unbound > HDL27 9 > LDL 8 2 >> fisher.test(data) > > At odds of 3 and 4 with one count =2, even the best test won't help. Dieter -- View this message in co

Re: [R] Solving two nonlinear equations with two knowns

2009-07-17 Thread Ravi Varadhan
Kate, This is a difficult problem, mainly because your function is not deterministic. Run the function a couple of times with the same parameter values and you will get a different value each time. Obviously, you cannot optimize such functions in the ususal sense. However, you can rewrite the f

Re: [R] Solving two nonlinear equations and two knowns

2009-07-17 Thread Dieter Menne
yhsu6 wrote: > > I have two nonlinear equations, f1(x1,x2)=0 and f2(x1,x2)=0. I try to use > optim command by minimize f1^2+f2^2 to find x1 and x2. I found the optimal > solution changes when I change initial values. How to solve this? > > BTW, I also try to use grid searching. But I have no i

[R] c-index validation from Design library

2009-07-17 Thread Juliet Hannah
Hi Group, I have a question about obtaining the bias-corrected c-index using validate from the Design library. As an example, consider the example from help page: library(Design) ?validate.lrm n <- 1000 age<- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15) cholesterol<- rno

Re: [R] Solving two nonlinear equations with two knowns

2009-07-17 Thread Berend Hasselman
yhsu6 wrote: > > > ## > #R code: > mu2=0.4 > sigma2=4 > tau=0.75 > mean.diff=2 > var.ratio=3 > > #Use optim: > parameter<-function(c) > { > a<-c[1] > b<-c[2] > u<-runif(1) > Y<-qnorm(u,mean=mu2,sd=sigma2) > u<-runif(1) > X<-qnorm(u,mean=mu2,sd=sigma2)+a*abs(u-ta

Re: [R] Passing additional arguments through '...'

2009-07-17 Thread Charles C. Berry
On Fri, 17 Jul 2009, escher2079 wrote: Fair enough. I'm not going to post all the code because it's distracting, but the following example function is demonstrative of the problem: exfun<-function(...){ print(x) } I'm aware that leaving making the only inputs additional arguments is bad form,

[R] poly objects as data frame columns

2009-07-17 Thread Ulrike Grömping
Dear UseRs, I just learnt that the number of columns of a data frame is not always what I thought it to be, and I wonder where I should have learnt about this. Consider the following example: dat <- data.frame(X1=1:10, X2=LETTERS[1:10]) ncol(dat) ## evaluates to 2 (of course) dat$X1poly

Re: [R] Fisher's exact test

2009-07-17 Thread Duncan Murdoch
On 7/17/2009 12:13 PM, James Allsopp wrote: Hi, I'm trying to run Fisher's Exact test on the data below, but I'm not sure how interpret the data shown. Can someone tell me what this is saying? Looking at the numbers it should be that there's no significant difference between the HDL and LDL, but

[R] Data mining, R and MySQL ...

2009-07-17 Thread Guazzelli, Alex
The question is: you have your data in MySQL, build your model in R, but now want to use the model to score your MySQL data on an on-going basis, what to do? MySQL users frequently use R for data mining and to build statistical models. They benefit from the RMySQL package which builds an in

Re: [R] How to do adjust for sex, age, genotype for a data

2009-07-17 Thread 1Rnwb
then what will be the other factors needed to be adjusted and whether I should adjust or use them as covariates. Finally how these analysis will be done in R Harrell, Frank E wrote: > > 1Rnwb wrote: >> Hello R gurus, >> >> I am biologist doing biomarker research and I have a data set where I >

[R] dot plot with several points for 2 categories

2009-07-17 Thread jaregi
I'm trying to wean myself off the very limited capabilities of Excel and Oo. Currently, I am trying to make a plot showing several values for 2 categories in a dot blot (see http://www.nabble.com/file/p24538360/Picture%2B1.png Picture+1.png except that the x axis should contain the category not

Re: [R] Entire Organization Switching from SAS to R - Any experience?

2009-07-17 Thread Marc Schwartz
On Jul 17, 2009, at 9:57 AM, Kelvin Lam wrote: I should elaborate the situation a bit more. We store our data in UNIX and have been using UNIX SAS for our work. My Biostat dept has 40 SAS users from which at most 10 also use R. The Epi/Grad Students/Investigators combine for another 30-

Re: [R] poly objects as data frame columns

2009-07-17 Thread David Winsemius
Dataframes are lists. Look at dat with str and you will see that the third column (actually the third list element) is a matrix. It's not hard to find the documentation. If you read the documentation on the help page for data.frame you should see this: "If a list or data frame or matrix is

Re: [R] dse model setup help

2009-07-17 Thread Bob McCall
I thought that I wanted the non-innovations form but wanted R and w(t) to be zero. I thought leaving out R would give that. What I'm trying to do is estimate a transfer function noise model. I noticed that you suggested to another person to use ARMA() and one can estimate the forecast function of

Re: [R] dot plot with several points for 2 categories

2009-07-17 Thread Michael Knudsen
On Fri, Jul 17, 2009 at 7:17 PM, jaregi wrote: > I'm trying to wean myself off the very limited capabilities of Excel and Oo. > Currently, I am trying to make a plot showing several values for 2 > categories in a dot blot (see > http://www.nabble.com/file/p24538360/Picture%2B1.png Picture+1.png  e

Re: [R] dot plot with several points for 2 categories

2009-07-17 Thread Steve Lianoglou
Hi, On Jul 17, 2009, at 1:17 PM, jaregi wrote: I'm trying to wean myself off the very limited capabilities of Excel and Oo. Currently, I am trying to make a plot showing several values for 2 categories in a dot blot (see http://www.nabble.com/file/p24538360/Picture%2B1.png Picture+1.png

Re: [R] Entire Organization Switching from SAS to R - Any experience?

2009-07-17 Thread Ross Boylan
We use SAS and R here (a biostat department and consulting unit), in part because there are some things SAS does that R doesn't. In particular, we use SAS proc nlmixed with custom likelihood functions. R has similar capability but does not allow custom likelihood; the authors say adding it would

Re: [R] log error for use on axis

2009-07-17 Thread Vikneswaran Gopal
NDC/jshipman wrote: Hi, I am new to R plot. I am trying to scale my y axis in log. When I do this I receive the following error Error in axis(side = side, at = at, labels = labels, ...) : CreateAtVector [log-axis()]: axp[0] = 0 < 0! In addition: Warning messages: 1: In plot.window(...)

Re: [R] log error for use on axis

2009-07-17 Thread Marc Schwartz
On Jul 17, 2009, at 11:27 AM, NDC/jshipman wrote: Hi, I am new to R plot. I am trying to scale my y axis in log. When I do this I receive the following error Error in axis(side = side, at = at, labels = labels, ...) : CreateAtVector [log-axis()]: axp[0] = 0 < 0! In addition: Warning mess

Re: [R] dse model setup help

2009-07-17 Thread Bob McCall
I reworked this using the innovations form and it seems to work. But none of the parameters were changed after estimation. summary lists: $counts function gradient 1 1 It guess it calculates the function but doesn't optimize the parameters. I just used: tfn.est <- estMaxLik(

Re: [R] poly objects as data frame columns

2009-07-17 Thread Ulrike Grömping
David, thanks. Your explanation does not quite fit, though, as it refers to using function data.frame, while I assigned the new column with $<-. poly() does return an object of classes poly and matrix, not model.matrix, and handing a poly object to function data.frame does behave like I would ex

Re: [R] Solving two nonlinear equations with two knowns

2009-07-17 Thread yhsu6
Thanks a lot Berend and Ravi!!! I am thinking to use integrate command to get theoretical E(X), E(Y), Var(X), and Var(Y). Then the result will not depend on u anymore. After that, I will use dfsane command in BB package. Kate Original message >Date: Fri, 17 Jul 2009 09:51:34 -0700 (P

Re: [R] poly objects as data frame columns

2009-07-17 Thread David Winsemius
On Jul 17, 2009, at 3:24 PM, Ulrike Grömping wrote: David, thanks. Your explanation does not quite fit, though, as it refers to using function data.frame, while I assigned the new column with $<-. poly() does return an object of classes poly and matrix, not model.matrix, But model.matr

Re: [R] Entire Organization Switching from SAS to R - Any experience?

2009-07-17 Thread Frank E Harrell Jr
I differ with Marc in one way. It is amazing what people can learn when you create an emergency for them to do so. Frank Marc Schwartz wrote: On Jul 17, 2009, at 9:57 AM, Kelvin Lam wrote: I should elaborate the situation a bit more. We store our data in UNIX and have been using UNIX

Re: [R] c-index validation from Design library

2009-07-17 Thread Frank E Harrell Jr
Juliet Hannah wrote: Hi Group, I have a question about obtaining the bias-corrected c-index using validate from the Design library. As an example, consider the example from help page: library(Design) ?validate.lrm n <- 1000 age<- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15

[R] How do I run the by function on an object of class "by"???

2009-07-17 Thread chipmaney
I wrote a function with some loops and avoided a third loop by using the "by" function. The output object is an array (or list) of class "by" that looks like this: >StationCover.df Empirical.df$Quadrat: VFFF9-21 Station Shrub Tree Woody Invasive Herb Litter Bare [1,] 0.0 11

Re: [R] poly objects as data frame columns

2009-07-17 Thread Ulrike Grömping
David Winsemius wrote: > > > On Jul 17, 2009, at 3:24 PM, Ulrike Grömping wrote: > >> >> David, >> >> thanks. Your explanation does not quite fit, though, as it refers to >> using >> function data.frame, while I assigned the new column with $<-. >> poly() does >> return an object of classe

[R] package to do inverse probability weighting in longitudinal data

2009-07-17 Thread Lei Liu
Hi there, I have a dataset from a longitudinal study with a lot of drop-out. I want to implement the inverse probability weighting method by Robins 1995 JASA paper "Analysis of semiparametric regression models for repeated outcomes in the presence of missing data". Does anyone know if there i

[R] Help with R.oo

2009-07-17 Thread Jim Nemesh
Hi! I'm trying to learn about object oriented R, as it seems like it would be very useful. I'm going over an example from the documentation, and I'm very confused: http://www1.maths.lth.se/help/R/R.oo/ [assume you've called library (R.oo)] setConstructorS3("SavingsAccount", function(balance=

Re: [R] Problems generating image from tiff file

2009-07-17 Thread Mehdi Khan
Paul, Thank you very much for your explanation. I have only been using R for GIS purposes for about a week, so my expertise in the field is shallow. Your explanation helped me out and I was able to plot the tif file simply by using the spplot command. The reason I was projecting it was that I a

Re: [R] poly objects as data frame columns

2009-07-17 Thread David Winsemius
On Jul 17, 2009, at 5:25 PM, Ulrike Grömping wrote: David Winsemius wrote: On Jul 17, 2009, at 3:24 PM, Ulrike Grömping wrote: David, thanks. Your explanation does not quite fit, though, as it refers to using function data.frame, while I assigned the new column with $<-. poly() does retu

Re: [R] Help with R.oo

2009-07-17 Thread Henrik Bengtsson
On Fri, Jul 17, 2009 at 11:41 PM, Jim Nemesh wrote: > Hi!  I'm trying to learn about object oriented R, as it seems like it > would be very useful. > > I'm going over an example from the documentation, and I'm very confused: > > http://www1.maths.lth.se/help/R/R.oo/ > > [assume you've called librar

Re: [R] Help with R.oo

2009-07-17 Thread Henrik Bengtsson
On Sat, Jul 18, 2009 at 3:21 AM, Henrik Bengtsson wrote: > On Fri, Jul 17, 2009 at 11:41 PM, Jim Nemesh wrote: >> Hi!  I'm trying to learn about object oriented R, as it seems like it >> would be very useful. >> >> I'm going over an example from the documentation, and I'm very confused: >> >> http:

[R] how to run the R script in background in Windows XP?

2009-07-17 Thread Jie TANG
Hello ,everyone. I am a fresh user of R. I wrote several several R script in R with the version 2.9.1 in Windows XP. But I only can run these scrpit via R-GUI. Can anyone tell me how to run the scripts in background without openning R-gui.In another word, run the R-script and get the result

[R] apply/return and reuse

2009-07-17 Thread Mark Knecht
Hi, Is it possible to make something like the following code actually work? My goal in this example would be that I'd see results like 1 1 10100 2 10100 10200 3 10200 10300 4 10300 10400 In real usage the function would obviously do a lot more work, but the question I canno

Re: [R] apply/return and reuse

2009-07-17 Thread Gabor Grothendieck
See ?Reduce On Fri, Jul 17, 2009 at 11:10 PM, Mark Knecht wrote: > Hi, >   Is it possible to make something like the following code actually > work? My goal in this example would be that I'd see results like > > 1   1   10100 > 2   10100   10200 > 3   10200   10300 > 4   10300   10400 > > In r

Re: [R] how to run the R script in background in Windows XP?

2009-07-17 Thread Gabor Grothendieck
Check out: ?Rscript On Fri, Jul 17, 2009 at 10:14 PM, Jie TANG wrote: > Hello ,everyone. > >  I am a fresh user of R. I wrote several several R script in   R with the > version 2.9.1 in Windows XP. But I only can run these scrpit via R-GUI. > >  Can anyone tell me how to run the scripts in backgr

Re: [R] How to do adjust for sex, age, genotype for a data

2009-07-17 Thread Charles C. Berry
On Fri, 17 Jul 2009, 1Rnwb wrote: then what will be the other factors needed to be adjusted It is NOT an exaggeration to say that hundreds of research papers, dozens of books, and many dissertations have been written on how to go about answering that question in one context or another. Gi

[R] Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size

2009-07-17 Thread Elizabeth Stanny
Hi, 1. I want 95% not 99% confidence intervals in my summary.Design plot using the Design package. Putting conf.int=.95 as an argument in plot does not work. The default appears to be .99 not .95 as stated in the package Design manual (p. 164). 2. My sweave chuck is below and my output is

[R] Re placing null values (#NULL!)

2009-07-17 Thread PDXRugger
I am stumped. I have a data set with multiple columns and about 65,000 case. Some of the cases have a "#NULL!" value so for dataframe "Props_": access_emp pct_vacant TAVAIL park PARKACRES totlandare 4538 52.15 #NULL! 01 22.9974,129.70400 4539 52.

[R] Problem With Repeated Use Of Load/Save/Close Commands

2009-07-17 Thread Marilyn & Rich Short
Hello, I'm having a problem in R with repeated use of the "load", "save", and "close" commands. I'm getting an error message that reads, "Too many open files". I'm opening files and closing them (and unlinking them), but when I go through that process 509 times, the program halts and I get th

Re: [R] Re placing null values (#NULL!)

2009-07-17 Thread Michael Knudsen
On Fri, Jul 17, 2009 at 10:37 PM, PDXRugger wrote: > So i need to replace the the #NULL! with 0.  I have tried: > > Props_pct_vacant<-Props_pct_vacant[Props_$pct_vacant !="#NULL!"] Try this instead: Props_$pct_vacant[which(Props_$pct_vacant=="#NULL!")] = 0 -- Michael Knudsen micknud...@gmail.c