[R] saving only part of a computation in integrate

2009-07-30 Thread Mary A. Marion
Hello, I am using Beta <-integrate(dnorm,mean=0,sd=1,-Inf,2.3552) > Beta 0.9907436 with absolute error < 4.2e-06 1-Beta results in an error How can I store into Beta only .9907436? Thank you. Sincerely, Mary A. Marion __ R-help@r-pr

[R] formatting in r

2009-07-28 Thread Mary A. Marion
etc. were added by hand. I need an example of how I can mix alphanumeric and numeric data on output. Can you assist? R is proving to be a really fine computational language that is easy to use. Thank you. Sincerely, Mary A. Marion u xbar alpha zcrit zcrit2 zstatpvalue 140

[R] graphs

2009-07-25 Thread Mary A. Marion
t;black") curve(dnorm(x,mean=150, sd=15),from=75, to=225, col='orange', add=TRUE) Thank you. Sincerely, Mary A. Marion __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] mathematical notation in R

2009-07-22 Thread Mary A. Marion
Hello, I have an R function which includes the statement LBAuo<- -. Rather than printing out - I want it to print out - infinity. As of yet I have not been able to do that. I am not in a graphics window just outputting a set of variables. Can you help? Thanks. Sincerely, Mar

[R] IF STATEMENTS

2009-07-10 Thread Mary A. Marion
Hello, I am working on using if statements. What is the error message telling me here and how do I correct for it? I have tried various combinations of quotes. Thank you. Sincerely, Mary A. Marion #Find critical values crit<-function(n,alpha,type) { if (type==twoSided) { alpha2=alpha/2

[R] math symbols in R

2009-07-09 Thread Mary A. Marion
, Mary A. Marion __ 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] naming of columns in R dataframe consisting of mixed data (alphanumeric and numeric)

2009-07-09 Thread Mary A. Marion
void the following error: Error in names(tresults2) <- c("Statistic ", "Value") : 'names' attribute [2] must be the same length as the vector [1] Am I to use c( , ) or list( , ) with a dataframe? Thank you for your help. Sincerel

[R] print of objects in R

2009-03-19 Thread Mary A. Marion
Hello, I have been watching my output as I create functions and do other things in r. One thing I don't like is the [1,] type notation at the beginning of a line. I have been able to change that to a number such as 1 2 etc. using as.data.frame(object). How can I stop the printing of a lin

[R] R code -column headings

2009-03-06 Thread Mary A. Marion
t;Midwest", "South", "West" ) colnames(x)=c("Public", "Private") as.data.frame(as.table(x)) 2] add a column heading for region when I use addmargins(x) addmargins(x) #margin.table(x,1) #margin.table(x,2) Thank you. Sincerely, Mary A. Marion