Re: [R] Fisher test problem

2009-03-22 Thread Viju Moses
As you say, I guess that's not possible. Meanwhile I've got R's results verified in Stata . tabi 17 6 \ 2 1, chi2 exact | col row | 1 2 | Total ---+--+-- 1 |17 6 |23 2 |

Re: [R] Fisher test problem

2009-03-22 Thread Thomas Lumley
On Sat, 21 Mar 2009 markle...@verizon.net wrote: by definition, the one tailed p-value has to be = 0.5 so there is still something wrong with your OpenEpi calc. I think that's a little strong. Firstly, a one-tailed test in a pre-determined direction can have any p-value. Secondly, even the

Re: [R] Forestplot () box size question

2009-03-22 Thread Thomas Lumley
On Sat, 21 Mar 2009, Gerard Smits wrote: I have tried several sites (2 in Ca and also Australia) and find only version 2.14. Which site did you pull 2.15 from? I have checked half a dozen sites in various countries, and they all have 2.15 (even in the Southern Hemisphere -- it's not that

[R] Estimating LC50 from a Weibull distribution

2009-03-22 Thread Greg
I am attempting to estimate LC50 (analogous to LD50, but uses exposure concentration rather than dose) by fitting a Weibull model; but I can't seem to get it to work. From what I can gather, I should be using survreg() from the survival package. The survreg() function relies on time-to-event

Re: [R] data analysis. R

2009-03-22 Thread UBC
thx for ur fast responds. but sorry for asking stupid, i am a turn beginner of R (just trying it out 3 months, and i am taking my first course about it) so, to tackle this questions, i was told to use nested design method, could you actually show me how would u attempt this problem? (a) Determine

[R] Peña, Rodríguez test

2009-03-22 Thread J C
Hi, Anyone have done anything about this Peña, Rodríguez test b4. I have never seen it b4 in my life. Now i simply need to write some R code for this. any help would be appreciated. _ Chat with the whole group, and

[R] variance/mean

2009-03-22 Thread rkevinburton
At the risk of appearing ignorant why is the folowing true? o - cbind(rep(1,3),rep(2,3),rep(3,3)) var(o) [,1] [,2] [,3] [1,]000 [2,]000 [3,]000 and mean(o) [1] 2 How do I get mean to return an array similar to var? I would expect in the above example a

Re: [R] variance/mean

2009-03-22 Thread Ted Harding
On 22-Mar-09 08:17:29, rkevinbur...@charter.net wrote: At the risk of appearing ignorant why is the folowing true? o - cbind(rep(1,3),rep(2,3),rep(3,3)) var(o) [,1] [,2] [,3] [1,]000 [2,]000 [3,]000 and mean(o) [1] 2 How do I get mean to

Re: [R] variance/mean

2009-03-22 Thread Wacek Kusnierczyk
rkevinbur...@charter.net wrote: At the risk of appearing ignorant why is the folowing true? o - cbind(rep(1,3),rep(2,3),rep(3,3)) var(o) [,1] [,2] [,3] [1,]000 [2,]000 [3,]000 and mean(o) [1] 2 How do I get mean to return an array similar to

Re: [R] package sowas

2009-03-22 Thread ronggui
There is a binary version for Windows in the homepage of it. http://www.cru.uea.ac.uk/~douglas/software/sowas_0.94.zip You can find more on http://tocsy.agnld.uni-potsdam.de/wavelets/ Best 2009/3/22 stephen sefick ssef...@gmail.com: You must go to his website because it is not on CRAN.  I have

Re: [R] limiting simulated animal movement

2009-03-22 Thread Jim Lemon
Umesh Srinivasan wrote: Hi, I am trying to simulate animal movement in a gridded landscape made up of cells. At each time step (iteration), the animal moves from one cell to another in a random fashion. ... The problem is 1. I want to limit animals to a pre-defined circular home range 2. I want

Re: [R] limiting simulated animal movement

2009-03-22 Thread Umesh Srinivasan
Wow, that was really quick, thanks a lot. Will try this and get back to you. Cheers, Umesh On Sun, Mar 22, 2009 at 3:52 PM, Jim Lemon j...@bitwrit.com.au wrote: Umesh Srinivasan wrote: Hi, I am trying to simulate animal movement in a gridded landscape made up of cells. At each time step

Re: [R] bargraph.CI change se for sd

2009-03-22 Thread herwig
Thanks for the solution. And sorry about the not workable example (I actually edited the post a minute after posting it -too late I am afraid). library(sciplot) bargraph.CI(peptide, surface, group=adjunct,data = y) Error in eval(substitute(subset), envir = data) : object y not found #

[R] Help plotting a histogram of X~Exp(1)

2009-03-22 Thread BowlesMcCann
I want to plot a histogram of X~Exp(1) where X is the sum of Y + Z. To do this, should I simulate values of Y and Z using Y-runif(100) and Z-runif(100)? And where do I go from there? Many thanks. -- View this message in context:

Re: [R] Plot and Boxplot in the same graph

2009-03-22 Thread johnhj
I tried to do it with: y - rnorm(100) x - gl(2,50) boxplot(x,y) points(x,y) But the problem is, that the the y coordinates are shown for the boxplot and not for points(x,y) Is it possible to show the graph with the (x,y) coordinates with the points() function and the boxplots only for the x

Re: [R] Estimating LC50 from a Weibull distribution

2009-03-22 Thread Christian Ritz
Hi Greg, you can use the extension package 'drc' from CRAN: conc - c(10.3, 10.8, 11.6, 13.2, 15.8, 20.1) # Exposure concentrations orign - c(76, 79, 77, 76, 78, 77) # Original number of subjects ndead - c(16, 22, 40, 69, 78, 77) # Number dead after 96 h d - data.frame(conc=conc, orign=orign,

Re: [R] Help plotting a histogram of X~Exp(1)

2009-03-22 Thread David Winsemius
If you run this you get sensible output, but whether it meets you needs depends on what you meant by Exp(1): Y - rnorm(100) Z - rnorm(100) X - exp(Y+Z) hist(X) If you are looking for methods to handle random variables in R, you may want to look at the series of packages all beginning

Re: [R] libRlapack.so not found

2009-03-22 Thread Johannes Huesing
Johannes Huesing johan...@huesing.name [Sat, Mar 21, 2009 at 08:12:05AM CET]: Whenever I try to load the Matrix package, I get the following error message: libRlapack.so: cannot open shared object file: No such file or directory A file with that name is indeed not on the hard disk.

[R] R: package sowas

2009-03-22 Thread mauede
I downloaded it. But I could not find the installation executable file. How can I install it on Windows XP ? Thank you. Maura -Messaggio originale- Da: ronggui [mailto:ronggui.hu...@gmail.com] Inviato: dom 22/03/2009 10.47 A: mau...@alice.it; r-help@r-project.org Oggetto: Re: [R]

Re: [R] R: package sowas

2009-03-22 Thread ronggui
Executable file is not required. You must install R first, then you click packages--install package(s) from local zip file ... to install the sowas package. Best 2009/3/22 mau...@alice.it: I downloaded it. But I could not find the installation executable file. How can I install it on Windows

[R] R: R: package sowas

2009-03-22 Thread mauede
OK.Done. Tank you very much. Maura -Messaggio originale- Da: ronggui [mailto:ronggui.hu...@gmail.com] Inviato: dom 22/03/2009 15.40 A: mau...@alice.it Cc: r-help@r-project.org Oggetto: Re: R: [R] package sowas Executable file is not required. You must install R first, then you click

[R] Multiple Comparisons for (multicomp - glht) for glm negative binomial (glm.nb)

2009-03-22 Thread lara harrup (IAH-P)
Hi I have some experimental data where I have counts of the number of insects collected to different trap types rotated through 5 different location (variable -location), 4 different chemical attractants [A, B, C, D] were applied to the traps (variable - semio) and all were trialled at two

[R] Problems with combining plots

2009-03-22 Thread johnhj
Hii, I will combine some plots. Like this example here http://www.statmethods.net/advgraphs/layout.html I tired to do it for 2 plots but without success. Here is my code: test-read.table(file=D:/file.txt) space-read.table(file=D:/space.txt) space$gruppe - 502*rep(1:6, each=7) x- c(test$V1) y-

Re: [R] Help plotting a histogram of X~Exp(1)

2009-03-22 Thread BowlesMcCann
Thank you very much! :) David Winsemius wrote: If you run this you get sensible output, but whether it meets you needs depends on what you meant by Exp(1): Y - rnorm(100) Z - rnorm(100) X - exp(Y+Z) hist(X) If you are looking for methods to handle random variables in

[R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread Nidhi Kohli
Hi, I'm trying to convert Matrix into a list format and have written the following code: path = (C:/2PL_Alpha_C_2PL_Loading) setwd(path) getwd() congeneric = matrix(rep(NA,36),nrow=6,ncol=6) conFirst = matrix(rep(NA,36),nrow=6,ncol=6) conFirstTwenty = rep(NA, 20) k = 1 #Reading all the

Re: [R] Accuracy of R and other platforms

2009-03-22 Thread Karl Ove Hufthammer
Alejandro C. Frery: @ARTICLE{AlmironSilvaMM:2009, author = {Almiron, M. and Almeida, E. S. and Miranda, M.}, title = {The Reliability of Statistical Functions in Four Software Packages Freely used in Numerical Computation}, journal = {Brazilian Journal of Probability and Statistics}, year =

[R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread Nidhi Kohli
Hi, I'm trying to convert Matrix into a list format and have written the following code: path = (C:/2PL_Alpha_C_2PL_Loading) setwd(path) getwd() congeneric = matrix(rep(NA,36),nrow=6,ncol=6) conFirst = matrix(rep(NA,36),nrow=6,ncol=6) conFirstTwenty = rep(NA, 20) k = 1 #Reading all the Alpha

Re: [R] Forestplot () box size question

2009-03-22 Thread Gerard Smits
Yes, my R is a few versions old. I did not realize that the package version was dependent on the R version. Thanks. Gerard PS was able to apply the code suggested by David W. to the 2.14 version and got it to work. At 12:32 AM 3/22/2009, Thomas Lumley wrote: On Sat, 21 Mar 2009, Gerard

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread Nidhi Kohli
Hi JiHo, Thank you so much for the quick reply. Let me explain you what I want. I have a data file in the following format: 0.610251D+00 0.615278D+00 0.583581D+00 0.560295D+00 0.501325D+00 0.639512D+00 0.701607D+00 0.544963D+00 0.589746D+00 0.648588D+00 0.608216D+00 0.582599D+00 0.625204D+00

Re: [R] Hollander's test of bivariate symmetry

2009-03-22 Thread joseph . g . boyer
Couldn't find it anywhere, so for future users who stumble on this thread, here is some code. Note: If your data has missing values, delete those observations from the data first before running this code. Place these functions in the global environment (ie run the code below). Then, to obtain

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread JiHO
On 2009-March-22 , at 13:06 , Nidhi Kohli wrote: I'm reading this file into a variable named congeneric (see my code) and now trying to pick up first 20 values and need these 20 values in a list format like 0.610251D+00 (row 1, col 1) 0.615278D+00 (row 1, col 2) 0.583581D+00 (row 1, col

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread JiHO
On 2009-March-22 , at 13:06 , Nidhi Kohli wrote: Thank you so much for the quick reply. Let me explain you what I want. I have a data file in the following format: 0.610251D+00 0.615278D+00 0.583581D+00 0.560295D+00 0.501325D+00 0.639512D+00 0.701607D+00 0.544963D+00 0.589746D+00

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread Nidhi Kohli
JiHo, Thanks for the reply, however i dont think it will help. Okay here is what i will achieve once i get this into a list format. I have another file in the following format: 0.63275433157105 0.686061949818395 0.786426681675948 0.954103894997388 0.600840965518728 0.949194842483848

[R] Selecting closest values

2009-03-22 Thread P_M
Hi I have a table with ID (1 to 183) and Location (144 to -22). My problem is that I want to select the 10 ID's that are closest in Location to ID 1, ID 2 and so on. Also, some ID have the same Location. Say, if 11 ID's are closest to ID 100 I want to randomly choose one of the ID's to select 10

Re: [R] Problems with combining plots

2009-03-22 Thread Wills, Kellie
par(mfrow=c(1,1)) will give you just one panel. Try par(mfrow=c(2,1)) or par(mfrow=c(1,2)). -Original Message- From: r-help-boun...@r-project.org on behalf of johnhj Sent: Sun 3/22/2009 10:50 AM To: r-help@r-project.org Subject: [R] Problems with combining plots Hii, I will

Re: [R] Selecting closest values

2009-03-22 Thread jim holtman
It would be helpful is you supplied a subset of the data so that we could see what you expect. The 'outer' On Sun, Mar 22, 2009 at 1:48 PM, P_M pmart...@broadpark.no wrote: Hi I have a table with ID (1 to 183) and Location (144 to -22). My problem is that I want to select the 10 ID's that

Re: [R] Selecting closest values

2009-03-22 Thread P_M
Yes, of course. ID loc 1 144 2 144 3 140 4 126 5 120 6 112 7 100 8 99 9 91 11 90 12 90 13 89 15 86 16

[R] using wavelet transform to calculate mean frequency of a signal

2009-03-22 Thread stvienna wiener
Dear list, in short: I would like to calculate the mean frequency of a signal (e.g. time series) using the wavelet transform. with details: I did not find a R function to calculate a mean frequency using one of the cran packages. My searches using R Site Search returned: **(1)waveclock

Re: [R] Pruning trees in a Random Forest

2009-03-22 Thread Liaw, Andy
Jerry Friedman advocated a few mods to RF in his ISLE algorithm: - draw smaller samples - grow smaller trees - post process the forest using something like PathSeeker (or LASSO) Andy From: Wensui Liu [mailto:liuwen...@gmail.com] Sent: Fri 3/20/2009 4:46 PM

Re: [R] Selecting closest values

2009-03-22 Thread jim holtman
If we assume the distance is linear, this might work: x ID loc 1 1 144 2 2 144 3 3 140 4 4 126 5 5 120 6 6 112 7 7 100 8 8 99 9 9 91 10 11 90 11 12 90 12 13 89 13 15 86 14 16 85 15 17 85 16 18 80 17 19 79 18 20 79 19 21 78 20 22 78 21 23 76 22 24 74 23 25 73

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Nidhi Kohli Sent: Sunday, March 22, 2009 10:41 AM To: JiHO Cc: R Help Subject: Re: [R] Converting Matrix into List - problem (urgent) JiHo, Thanks for the reply, however i

Re: [R] Multiple Comparisons for (multicomp - glht) for glm negative binomial (glm.nb)

2009-03-22 Thread Achim Zeileis
On Sun, 22 Mar 2009, lara harrup (IAH-P) wrote: Hi I have some experimental data where I have counts of the number of insects collected to different trap types rotated through 5 different location (variable -location), 4 different chemical attractants [A, B, C, D] were applied to the traps

[R] barplot2 x-axis

2009-03-22 Thread Mafalda Viana
Dear R users, I am trying to build a barplot2 graph however I can't find a way of defining the scale for the x-axis. I would like to show in my x-axis only the numbers 0, 25, 50, 75 etc. (so far R is giving me a random scale hard to interpret and it doens't look nice...). Could anyone advise me

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread JiHO
On 2009-March-22 , at 12:26 , Nidhi Kohli wrote: I want to remove the Column name and Row name from the above output. Any help on this will be greatly appreciated (I'm open to any other alternative way to convert Matrix into List also) What are you trying to achieve exactly? Do you just

Re: [R] Selecting closest values

2009-03-22 Thread Johannes Huesing
P_M pmart...@broadpark.no [Sun, Mar 22, 2009 at 06:48:36PM CET]: Hi I have a table with ID (1 to 183) and Location (144 to -22). My problem is that I want to select the 10 ID's that are closest in Location to ID 1, ID 2 and so on. Also, some ID have the same Location. Say, if 11 ID's are

[R] 'require' equivalent for local functions

2009-03-22 Thread JiHO
Hello everyone, I often create some local libraries of functions (.R files with only functions in them) that I latter call. In scripts that call a function from such library, I would like to be able to test whether the function is already known in the namespace and, only if it is not,

Re: [R] 'require' equivalent for local functions

2009-03-22 Thread Gabor Grothendieck
Try this: if (!exists(myfun, mode = function)) source(myfile.R) Also check the other arguments of exists in case you want to restrict the search. On Sun, Mar 22, 2009 at 5:05 PM, JiHO jo.li...@gmail.com wrote: Hello everyone, I often create some local libraries of functions (.R files with

Re: [R] 'require' equivalent for local functions

2009-03-22 Thread Wacek Kusnierczyk
JiHO wrote: Hello everyone, I often create some local libraries of functions (.R files with only functions in them) that I latter call. In scripts that call a function from such library, I would like to be able to test whether the function is already known in the namespace and, only if it is

Re: [R] barplot2 x-axis

2009-03-22 Thread Marc Schwartz
On Mar 22, 2009, at 2:31 PM, Mafalda Viana wrote: Dear R users, I am trying to build a barplot2 graph however I can't find a way of defining the scale for the x-axis. I would like to show in my x-axis only the numbers 0, 25, 50, 75 etc. (so far R is giving me a random scale hard to

[R] If statement generates two outputs

2009-03-22 Thread jimdare
Hi, How do I tell an if statement to generate two seperate outputs. E.g If X5 I want to create df1 and df2: if (X5) {df1-c(4,5,6,7,8) AND df2-c(9,10,11,12,13)} Thanks, James -- View this message in context: http://www.nabble.com/If-statement-generates-two-outputs-tp22650844p22650844.html

Re: [R] If statement generates two outputs

2009-03-22 Thread Wacek Kusnierczyk
jimdare wrote: Hi, How do I tell an if statement to generate two seperate outputs. E.g If X5 I want to create df1 and df2: if (X5) {df1-c(4,5,6,7,8) AND df2-c(9,10,11,12,13)} almost there: if (X5) {df1-c(4,5,6,7,8); df2-c(9,10,11,12,13)} vQ

Re: [R] If statement generates two outputs

2009-03-22 Thread Daniel Moreira
if (X5) { df1-c(4,5,6,7,8) df2-c(9,10,11,12,13) } hth, Daniel Moreira, MD jimdare jamesdar...@gmail.com Sent by: r-help-boun...@r-project.org 03/22/2009 05:27 PM To r-help@r-project.org cc Subject [R] If statement generates two outputs Hi, How do I tell an if statement to

Re: [R] If statement generates two outputs

2009-03-22 Thread jimdare
Thanks very much Wacek Kusnierczyk wrote: jimdare wrote: Hi, How do I tell an if statement to generate two seperate outputs. E.g If X5 I want to create df1 and df2: if (X5) {df1-c(4,5,6,7,8) AND df2-c(9,10,11,12,13)} almost there: if (X5) {df1-c(4,5,6,7,8);

[R] Following progress in a lapply() function

2009-03-22 Thread Blanchette, Marco
Dear all, I am processing a very long and complicated list using lapply through a custom function and I would like to generate some sort of progress report. For instance, print a dot on the screen every time 1000 item have been process. Or even better, reporting the percent of the list that

Re: [R] barplot2 x-axis

2009-03-22 Thread Mafalda Viana
Dear Mark, Thanks for your reply. I attach one of my plots as an example (e.g.Mafalda) to show what I want. If you notice in the plot the x-axis has a funny scale (0, 13, 28...) and what I would like to do is to make that scale from 0 and then increasing by 25 km for a better interpretation (0,

[R] data frame to array

2009-03-22 Thread Thomas S. Dye
Aloha all, I have a data frame with 4 columns. The first three are factors (f1, f2, f3) and the fourth is numeric. I'd like to explore these data using median polish. To do that I plan to use medpolish() on the matrix[f1,f2xf3], then medpolish on the resulting matrix[f2,f3]. This

Re: [R] Following progress in a lapply() function

2009-03-22 Thread Gabor Grothendieck
There are several packages with progress bars: RSiteSearch(progress) On Sun, Mar 22, 2009 at 6:06 PM, Blanchette, Marco m...@stowers.org wrote: Dear all, I am processing a very long and complicated list using lapply through a custom function and I would like to generate some sort of

Re: [R] Following progress in a lapply() function

2009-03-22 Thread hadley wickham
On Sun, Mar 22, 2009 at 5:06 PM, Blanchette, Marco m...@stowers.org wrote: Dear all, I am processing a very long and complicated list using lapply through a custom function and I would like to generate some sort of progress report. For instance, print a dot on the screen every time 1000

Re: [R] Selecting closest values

2009-03-22 Thread Bill.Venables
Here is one way you might find useful id - 1:183 lo - sample((-22):144, 183, rep = TRUE) ds - outer(lo, lo, function(x,y) abs(x-y)) rs - t(apply(ds, 2, function(x) id[order(x)][2:11])) rownames(rs) - id Here's what I got head(rs) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] 1 118

Re: [R] I have a question about a programa in R

2009-03-22 Thread Carlos J. Gil Bellosta
Hello, And what is exactly your problem? Best regards, Carlos J. Gil Bellosta http://www.datanalytics.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] data frame to array

2009-03-22 Thread Bill.Venables
Here is a possibility Dat - cbind(expand.grid(f1 = letters[1:5], f2 = LETTERS[1:5], f3 = as.character(1:5)), x = rnorm(125)) M - with(Dat, { f23 - f2:f3 m - matrix(0, length(levels(f1)), length(levels(f23))) i - match(f1, levels(f1))

Re: [R] barplot2 x-axis

2009-03-22 Thread Marc Schwartz
Looking at the graphic (I got it here, but it was stripped for those getting it via the server), the CI's don't really add much to the interpretation of the data. They are small enough as to be a non-issue at least in this example and there is too much data to make them useful for visually

Re: [R] If statement generates two outputs

2009-03-22 Thread jimdare
Hi, I tried to create the following if / else statement but I keep getting the error Error: unexpected '}' in size=large,center=none) } (I have highlighted the } in bold where the error is occuring). I can't seem to find a reason for this, does anyone know how I can fix it? Thanks, James

[R] using xyplot

2009-03-22 Thread Santosh
Dear R-sians! I am trying generate a bunch of xyplots library(lattice) myPanel - function(x,y,xl=range(x),yl=range(y),...) { panel.xyplot(x,y,pch=20,col='blue',cex=0.7,xlim=xl,ylim=yl,...) panel.abline(v=0, col='gray30',lty=2,lwd=1.5,...) panel.loess(x,y,

Re: [R] 'require' equivalent for local functions

2009-03-22 Thread Duncan Murdoch
On 22/03/2009 5:05 PM, JiHO wrote: Hello everyone, I often create some local libraries of functions (.R files with only functions in them) that I latter call. In scripts that call a function from such library, I would like to be able to test whether the function is already known in the

[R] Axes in 3D plots

2009-03-22 Thread Leah Gerber
I am wondering if anyone knows how to change or rotate the default axes on a 3D scatterplot. I would like to change which sides of the cube the 3 axes are displayed on. Many thanks, Leah Gerber [[alternative HTML version deleted]]

Re: [R] Axes in 3D plots

2009-03-22 Thread Daniel Moreira
To rotate the graph you can change the viewpoint. Try: ?rgl.viewpoint library(rgl) x - sort(rnorm(1000)) y - rnorm(1000) z - rnorm(1000) + atan2(x,y) plot3d(x, y, z, col=rainbow(1000), size=2) start - proc.time()[3] while ((i - 36*(proc.time()[3]-start)) 360) { rgl.viewpoint(i,i/4); } To

Re: [R] If statement generates two outputs

2009-03-22 Thread jim holtman
You appear to have a number of unbalanced parentheses in your statements. Here is one that seems to work: if (nostocks=3) {data1-test[,data1stocks]; tex1-latex(data1, file=paste(i$Species[1], 1.tex, sep=), rowname = NULL,

[R] mvpart error

2009-03-22 Thread Josh Stumpf
Hello all, When attempting a classification tree using mvpart, I get the following error: thesis2.mvp=mvpart(bat_sp~., data=alltrees.df) Error in all(keep) : unused argument(s) (c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,

[R] Help with 'boot'

2009-03-22 Thread pgseye
Hi, I'm wanting to test for a difference in medians between 2 groups using resampling methods. I found the boot package, but don't really understand how to write the 'statistic' function required as the 2nd argument for the bootstrap test. Thanks if you can help, Paul -- View this message in

[R] newton method

2009-03-22 Thread Roslina Zakaria
Hi R-users, Does R has a topic on newton's method? Thank you for the info. __ 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

Re: [R] Selecting closest values

2009-03-22 Thread Frank E Harrell Jr
bill.venab...@csiro.au wrote: Here is one way you might find useful id - 1:183 lo - sample((-22):144, 183, rep = TRUE) ds - outer(lo, lo, function(x,y) abs(x-y)) rs - t(apply(ds, 2, function(x) id[order(x)][2:11])) rownames(rs) - id Here's what I got head(rs) [,1] [,2] [,3] [,4] [,5]

Re: [R] newton method

2009-03-22 Thread Michael Kubovy
Take a look at the functionsnlm(), optim() in the stats package and maxNR() in the maxLik package. On Mar 22, 2009, at 11:15 PM, Roslina Zakaria wrote: Does R has a topic on newton's method? _ Professor Michael Kubovy University of Virginia Department of

Re: [R] 'require' equivalent for local functions

2009-03-22 Thread Ken-JP
I agree with Duncan. I used to do exactly what you did - source()ing data files inside a wrapper not unlike C #define wrappers, but it became a headache with more files and the files began looking more cluttered. It has taken me several days to learn about how create a package properly, along