Re: [R] approximation function

2009-04-06 Thread carol white
Thanks for your reply. I know the exact values. The purpose is to find out the distribution function if it is exponential, linear, etc. Best, Carol --- On Mon, 4/6/09, Ravi Varadhan wrote: From: Ravi Varadhan Subject: Re: [R] approximation function To: wht_...@yahoo.com Cc: r-h...@stat.math.

[R] tkrplot installation problems

2009-04-06 Thread Abhijit Dasgupta
Hello, I'm running R 2.8.1 on Ubuntu Hardy. I'm trying to install tkrplot. Using r-cran-tkrplot from the repository, I'm getting the following error: > library(tkrplot) Loading required package: tcltk Loading Tcl/Tk interface ... done Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk

[R] multi panel plot using xyplot()

2009-04-06 Thread Schreiber, Stefan
Hi there, I hope you guys can help me with the following: If have a file like this: yearclone codeheight 19954 4-1 1 19964 4-1 2 19974 4-1 3 19954 4-2 1 19964 4-2 2 19974 4-2 3 19955 5-1 1

[R] ROCR package partial false positive and accuracy

2009-04-06 Thread Saeed Abu Nimeh
Hi, In the ROCR package is there a way to find the accuracy that corresponds to a given false positive rate. In version 1.0-2, the authors of the package added an option to find the partial area under the ROC curve up to a given false positive rate by passing an optional parameter fpr.stop: perf.au

Re: [R] SUM,COUNT,AVG

2009-04-06 Thread Jun Shen
This is a good example to compare different approaches. My understanding is aggregate() can apply one function to multiple columns summarize() can apply multiple functions to one column I am not sure if ddply() can actually apply multiple functions to multiple columns? This is what I would like to

Re: [R] multi panel plot using xyplot()

2009-04-06 Thread jim holtman
Why don't you use something like this to plot without having to extract the clones: xyplot(height~year|factor(clone), x, group=code, layout=c(3,2)) On Mon, Apr 6, 2009 at 6:11 PM, Schreiber, Stefan wrote: > Hi there, > > I hope you guys can help me with the following: > > If have a file like

[R] Calculating marginal effects in R

2009-04-06 Thread Ranju Bhattarai
Hi, I estimated the probit model in R using glm command. I am looking for a way to estimate the marginal effects of the variables in the probit model. I would highly appreciate if anyone could share the code for estimating the marginal effects in R. Thank you Ranu [[alternative HTML vers

[R] Confidence interval?

2009-04-06 Thread Thomas Seth Davis
hi folks, I need help fitting/plotting a confidence interval to a frequency distribution Can someone help with this? thanks, tsd -Original Message- > Date: Mon Apr 06 15:08:20 MST 2009 > From: r-help-requ...@r-project.org > Subject: Welcome to the "R-help" mailing list >

Re: [R] how to subsample all possible combinations of n species taken 1:n at a time?

2009-04-06 Thread David Katz
If I understand your problem properly, you could just note that selecting 1:n of n objects is the same as deciding separately whether each one is included or not. (exclude the case where none are selected). Take 1000 of these and you are there- except some are duplicates - so generate extras and

[R] heatmap.2 no reordering of the columns and rows

2009-04-06 Thread Tanuja Bompada
Hi,   I need to generate a heatmap on a square matrix and wouldn't want to reorder the columns and the rows on the heatmap display.    I have used the options Rowv=NULL and Colv=NULL but doesn't seem to work. Following is a snippet of the heatmap function i am using. args <- commandArgs(); inpu

Re: [R] how to subsample all possible combinations of n species taken 1:n at a time?

2009-04-06 Thread David Katz
This is very cool indeed until you want to use more than 32 or so terms and most operating systems force you to go to floating point. > x=sample(2^34,1000) Error in sample(2^34, 1000) : invalid 'x' argument In addition: Warning message: In sample(2^34, 1000) : NAs introduced by coercion jholt

[R] extract values from summary

2009-04-06 Thread Felipe Carrillo
Hi: # How can I extract the 'Forecasts' from the 'summary(predicted)' from the example below? library(forecast) weightData <- data.frame(weight = c(2.1,2.4,2.8,3.6,4.1,5.2,6.3),week= 1:7) weight <- as.numeric(weightData$weight) predicted <- forecast(weight,h=3,level=95) # see the predicted sum

Re: [R] how to subsample all possible combinations of n species taken 1:n at a time?

2009-04-06 Thread jim holtman
If you want 128 combinations, then generate 8 16-bit random numbers and concatenate them together. You will have to check for dups as you generate the sequence, but it is at least a start and should fit within the memory of the system. On Mon, Apr 6, 2009 at 7:39 PM, David Katz wrote: > > This i

[R] Puzzled by an error with apply()

2009-04-06 Thread Gang Chen
I've written a function, myFunc, that works fine with myFunc(data, ...), but when I use apply() to run it with an array of data apply(myArray, 1, myFunc, ...) I get a strange error: Error in match.fun(FUN) : '1' is not a function, character or symbol which really puzzles me because '1' is meant

[R] Writing specific columns to a data file

2009-04-06 Thread Brendan Morse
Hi, I have a function that generates some output with 2 columns, but I only want to write the first column to a file. Is there a way to do this in the write.table command? thetaout=write.table(estimatedtheta, file="/Users/morse07/Desktop/R/ Trial/score.dat", row.names=F, col.names=F) Any adv

[R] Writing specific columns to a data file

2009-04-06 Thread Brendan Morse
Hi, I have a function that generates some output with 2 columns, but I only want to write the first column to a file. Is there a way to do this in the write.table command? thetaout=write.table(estimatedtheta, file="/Users/morse07/Desktop/R/ Trial/score.dat", row.names=F, col.names=F) Any adv

Re: [R] How to save the variables in R to a file

2009-04-06 Thread Bernardo Rangel Tura
On Mon, 2009-04-06 at 11:05 +0200, Cetinyürek Aysun wrote: > Dear list members, > > I have f.mean matrix of size 500 X 83 in R, and I want to save this into a > file. > I used the command > save("f.mean.Rdata",file="D:/Users/Ays/Documents/Results") > it saves but when I open the file in notepad it

Re: [R] Writing specific columns to a data file

2009-04-06 Thread Coen van Hasselt
By only selecting the first column, i.e. write.table(data[,1], file="", .) ? On Tue, Apr 7, 2009 at 12:28, Brendan Morse wrote: > Hi, I have a function that generates some output with 2 columns, but I > only want to write the first column to a file. Is there a way to do > this in the write.t

Re: [R] Puzzled by an error with apply()

2009-04-06 Thread Rolf Turner
On 7/04/2009, at 2:04 PM, Gang Chen wrote: I've written a function, myFunc, that works fine with myFunc(data, ...), but when I use apply() to run it with an array of data apply(myArray, 1, myFunc, ...) I get a strange error: Error in match.fun(FUN) : '1' is not a function, character or symbo

Re: [R] SUM,COUNT,AVG

2009-04-06 Thread hadley wickham
On Mon, Apr 6, 2009 at 5:31 PM, Jun Shen wrote: > This is a good example to compare different approaches. My understanding is > > aggregate() can apply one function to multiple columns > summarize() can apply multiple functions to one column > I am not sure if ddply() can actually apply multiple f

Re: [R] R package: Where to put code to Run Once Only?

2009-04-06 Thread Ken-JP
Thanks to pointers from Uwe, I first tried zzz.R and .First.lib(), which does what I needed (initialize once). Then under Martin's suggestion, I converted the package to use NAMESPACE and .onLoad(). Using NAMESPACE, I was able to hide my globals behind a "." (eg .myGlobal <<- 72) and use export

[R] Concern with randomForest

2009-04-06 Thread Ryan Harrigan
Hi all, When running a randomForest run using the following command: forestplas=randomForest(Prev~.,data=plas,ntree=20) print(forestplas) I get the following result: Call: randomForest(formula = Prev ~ ., data = plas, ntree = 2e+05, importance = TRUE) Type of random fore

Re: [R] SUM,COUNT,AVG

2009-04-06 Thread David Winsemius
On Apr 6, 2009, at 6:31 PM, Jun Shen wrote: This is a good example to compare different approaches. My understanding is aggregate() can apply one function to multiple columns summarize() can apply multiple functions to one column I am not sure if ddply() can actually apply multiple functions

Re: [R] R package: Where to put code to Run Once Only?

2009-04-06 Thread Rolf Turner
On 7/04/2009, at 3:34 PM, Ken-JP wrote: Using NAMESPACE, I was able to hide my globals behind a "." (eg .myGlobal <<- 72) and use exportPattern("^[^\\.]*") to prevent users from seeing my globals, yet I was able to access their values inside my package. WHY do

Re: [R] R package: Where to put code to Run Once Only?

2009-04-06 Thread Martin Morgan
Rolf Turner writes: > On 7/04/2009, at 3:34 PM, Ken-JP wrote: > > > >> Using NAMESPACE, I was able to hide my globals behind a "." (eg >> .myGlobal >> <<- 72) and use exportPattern("^[^\\.]*") to prevent users from >> seeing my >> globals, yet I was able to access their values inside my p

[R] parse_Rd() Version 2 on Japanese Vista 32 (encoding problems)

2009-04-06 Thread Ken-JP
Hi, I need some help with 2.9.0 parse_Rd() Version 2 changes. I read the .pdf file and some posts on r-help, but after playing with this for several hours, I can't seem to get around this UTF-8 problem. - I'm trying to get rid of some warnings during R CMD Check for R 2.9.0Alpha on Japanese Vis

Re: [R] R package: Where to put code to Run Once Only?

2009-04-06 Thread Ken-JP
Rolf, In general, I agree with you, but I am coding for a special case. 1. I am the only user and probably will be for the foreseeable future. 2. I like to have different tiers of visibility. At the public/highest level, I only want to see the functionality that I use often - my memory can only

[R] Maple and R

2009-04-06 Thread Roslina Zakaria
Hi R-users, Can Maple function be exported to R? I have a jacobian matrix (4X4) from maple in algebraic form which involve modified Bessel function of the first kind. I just wonder whether we can use algebraic form into R before the value of the parameters can be estimated. Thank you so much

Re: [R] contourplot label color

2009-04-06 Thread bruno joly
Deepayan Sarkar wrote: > On Mon, Apr 6, 2009 at 9:00 AM, bruno joly wrote: > >> Hi everyone, >> >> I am new to the list. >> My problem is to change the color of the label in a contour plot. The plot >> is quite dark and I'd like to have the line and label white, it works for >> the line with a

<    1   2