Re: [R] Emacs/R/SSH But View( ) Doesn't Work

2014-03-07 Thread Rainer M Krug
Hi this is an ESS related question, and should be asked at their mailing list [1]. But I guess, it has to do with the fact that View() opens a (tclk?) window and, as the R session is on the server, tries to do it on the server, which does not work. Look into rdired [2] in ESS which is a very

Re: [R] question on more efficient data block-match processing

2014-03-07 Thread Rainer Schuermann
What I would do: # read in your sample data mbr - read.table( clipboard, header = TRUE, stringsAsFactors = FALSE ) # create a vector with the codes you want to consider code.list - c(A,B,C,D,E) # reduce the data accordingly mbr - mbr[ mbr$code %in% code.list, ] # get your model matrix using

Re: [R] Importance Sampling Monte Carlo method for bivariate integration

2014-03-07 Thread Jeff Newmiller
Please read the Posting Guide, which warns you that posting HTML email to this mailing list is not okay. On the off chance that the HTML reaches us at all, it rarely appears to us the way you see it. Please communicate using plain text on this list.

Re: [R] Zero-dose constraint in modeling dose-response curves with gam

2014-03-07 Thread Simon Wood
Looking back at my post (Mar 26, 2013; 7:28am Re: [R] Use pcls in mgcv package to achieve constrained cubic spline), it seems to me that you could use the same trick, but omit the `-1' from the model formula. i.e. you set up a bunch of smooths constrained to pass through zero at zero, but

[R] help with stepAIC and boot

2014-03-07 Thread Luca Braglia
Hello everybody. I've a problem with stepAIC inside a boot function (i'm trying to do bootstrap backward elimination, with a statistic function that allow one to specify the formula of a coxph model) For the moment the function would be aimed storing selected vars However I've a problem in the

Re: [R] shapes of woodpeckers' cavities

2014-03-07 Thread ONKELINX, Thierry
Dear Violette, Search for elliptical Fourier analysis. RSiteSearch(elliptical fourier analysis) Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality Assurance

[R] Help with prob in sample()

2014-03-07 Thread Thomas
I'm trying to figure out exactly what the prob parameter in the sample function does. With the following code, does sample look randomly for the first possible sample--let's say it choses the second element--and then assess whether it can be chosen according to it's probability which is

Re: [R] shapes of woodpeckers' cavities

2014-03-07 Thread Jim Lemon
On 03/07/2014 08:51 AM, Violette BERTRAND wrote: Hi, I have pictures (.png) of the shape of many entrances of woodpeckers’ cavities, coloured in black. I want that R takes these pictures and stacks (superimposes) all the shapes to determine the tendency of the shape of cavities for each

[R] function doesn't change the variable in the right way

2014-03-07 Thread David Croll
Dear R users and friends, I would like to ask you about the weird behaviour of a function I just wrote. This little function should take a vector, find NAs and substitute them for the mean of the vector, and return the normalized value of that vector. I've tried both - and - for changing

Re: [R] function doesn't change the variable in the right way

2014-03-07 Thread fabian
Hello The function does exactly what you tell it to do; first you substitute all NA with the mean; then you subtract the mean; for the NA this meand: mean-mean=0; and this is what you get. the problem is not the function but the z-score of means. lg fabian On 07-03-2014 12:17, David Croll

Re: [R] Error with glmulti

2014-03-07 Thread Pascal Oettli
Hello, Your message is incomplete. And please don't post in HTML. Regards. On Fri, Mar 7, 2014 at 5:16 AM, Alicia Ellis alicia.m.el...@gmail.com wrote: I am analyzing some data that came from demographic health surveys. The data contain information for individuals within households, that are

Re: [R] shapes of woodpeckers' cavities

2014-03-07 Thread PIKAL Petr
Hi Another option can be to use e.g. ImageJ and compute fractal dimensions of the outline. Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jim Lemon Sent: Friday, March 07, 2014 12:04 PM To: Violette BERTRAND Cc:

Re: [R] function doesn't change the variable in the right way

2014-03-07 Thread Rui Barradas
Hello, Inline. Em 07-03-2014 11:17, David Croll escreveu: Dear R users and friends, I would like to ask you about the weird behaviour of a function I just wrote. This little function should take a vector, find NAs and substitute them for the mean of the vector, and return the normalized

Re: [R] Survfit error

2014-03-07 Thread Therneau, Terry M., Ph.D.
The help page for the survfit function says it expects a formula as its first argument so try: sleepfit - survfit(Surv(timeb, death)~1, data = sleep) David Sent from my iPhone ... so unable to test. This was a recent (well, 2007) change in behaviour. Previously the function did some tricks

Re: [R] pdf: plotting very small points

2014-03-07 Thread Prof Brian Ripley
On 05/03/2014 17:24, Duncan Murdoch wrote: On 05/03/2014 8:34 AM, rebecca.hil...@meteoswiss.ch wrote: Dear all, Ghostscript (version 9.05) cannot open pdfs produced with R (version 3.0.2) that contain very small points in plots. Other pdf readers (evince, AcrobatReader) are able to open the

[R] Making a dll in C# using R codes.

2014-03-07 Thread Ashis Deb
Hi all I want to add R with C# and want to call the R functions in C# and do computation . I had used the package Rdotnet package in C# , but cannot call a fuction of R in C# , if any one could help me with this . Thank You, ASHIS DEB

Re: [R] Bootstrapping with Kendall's tau

2014-03-07 Thread Therneau, Terry M., Ph.D.
With respect to question 2, I use the wild bootstrap for tau. Wu, C.F.J. (1986). Jackknife, bootstrap and other resampling methods in regression analysis (with discussions). Annals of Statistics, 14, 1261-1350. -- begin included message -- I want to bootstrap Kendall's tau

[R] What does the bandwidth at the bottom of periodogram mean

2014-03-07 Thread Baro
Hi experts if I run the code: k-c(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10) x.spec-spectrum(k,log=c(no)) at the bottom of dagram I have a bandwidth, what does it mean? [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] package environment versus namespace environment

2014-03-07 Thread Benjamin Tyner
Hello, I realize that a function in environment: base (for example, function head1 below) is unable to see (without resorting to ::, anyway) objects in utils (for example, head below), since package:base is after package:utils on the search path. However, I'm wondering what is the machinery that

Re: [R] details of cor function

2014-03-07 Thread Greg Snow
You could run the cor function on a small dataset where you know the values of tau-a and/or tau-b (either because you hand computed them, or found an example on the internet showing the difference), that would give some good evidence as to which is used. Or you could look at the source code, R is

Re: [R] Making a dll in C# using R codes.

2014-03-07 Thread Qiang Kou
I just used R and C# only once. I follow the tutorial from: http://vvella.blogspot.com/2010/08/integrate-c-net-and-r-taking-best-of.html http://www.codeproject.com/Articles/25819/The-R-Statistical-Language-and-C-NET-Foundations I hope it helps. Best, Qiang On Fri, Mar 7, 2014 at 10:01 AM,

Re: [R] pdf: plotting very small points

2014-03-07 Thread Rebecca.Hiller
-Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: Freitag, 7. März 2014 16:00 To: Duncan Murdoch; Hiller Rebecca; r-help@r-project.org Subject: Re: [R] pdf: plotting very small points On 05/03/2014 17:24, Duncan Murdoch wrote: On 05/03/2014 8:34

Re: [R] details of cor function

2014-03-07 Thread David Parkhurst
Thank you for your response. The first part of my question was meant to ask how do I actually find the source code? I tried to find that, without success. As for my comfort with a method that gives variable answers, I've experimented by running 100 cases and take the average. When I've

Re: [R] Survfit error

2014-03-07 Thread Hadley Wickham
On Fri, Mar 7, 2014 at 6:46 AM, Therneau, Terry M., Ph.D. thern...@mayo.edu wrote: The help page for the survfit function says it expects a formula as its first argument so try: sleepfit - survfit(Surv(timeb, death)~1, data = sleep) David Sent from my iPhone ... so unable to test. This

[R] [OT] Advice for medium size data management

2014-03-07 Thread Marco Barbàra
Dear UseRs, I am going to be involved in the analysis of a cohort of about 90,000 people. I still didn't have the data at hand, but I know that right now they are archived into spreadsheet files. So far I only analysed data sets of very small size. I probably will be able to work on a relatively

Re: [R] Bootstrapping with Kendall's tau---Wild bootstrap

2014-03-07 Thread David Parkhurst
Thank you for the suggestion. Is there a function for doing that in R? David On 3/7/2014 9:50 AM, Therneau, Terry M., Ph.D. wrote: With respect to question 2, I use the wild bootstrap for tau. Wu, C.F.J. (1986). Jackknife, bootstrap and other resampling methods in regression analysis

Re: [R] trying to plot.

2014-03-07 Thread MacQueen, Don
I'm going to assume that the binseg.mean.cumsum() function is from the changepoint package. I don't know any details about this function or package, so I'm going to make a suggestion based in basic R principles. I'd suggest that for the time being you ignore whatever it is that the changepoint

Re: [R] Survfit error

2014-03-07 Thread William Dunlap
It's not possible to be perfect in this scenario, but you could use some heuristics: survfit - function(x, ...) { xq - substitute(x) if (!is.call(xq)) { stop(First argument to survfit must be a function call) } It would be good to add another logical argument, say

Re: [R] [OT] Advice for medium size data management

2014-03-07 Thread MacQueen, Don
With those kinds of numbers, I would think a database would be appropriate (instead of spreadsheets). You can begin to assess performance of R with 90,000 observations with experiments like this: mydat - list() for (i in 1:30) mydat[[i]] - sample(letters, size=9, replace=TRUE) mydat2 -

Re: [R] package environment versus namespace environment

2014-03-07 Thread Duncan Murdoch
On 07/03/2014 10:16 AM, Benjamin Tyner wrote: Hello, I realize that a function in environment: base (for example, function head1 below) is unable to see (without resorting to ::, anyway) objects in utils (for example, head below), since package:base is after package:utils on the search path.

Re: [R] Help with prob in sample()

2014-03-07 Thread Greg Snow
Essentially what the sample function is doing (though it does it in a much more efficient way I expect) is the equivalent of this code: i - c(1:10) myProbs - c(0.1, 0.1, 0.1, 0.1, 0.1, 0.9, 0.9, 0.9, 0.9, 0.9) myProbs - myProbs/sum(myProbs) cp - c(0,cumsum(myProbs)) i[findInterval( runif(5), cp

Re: [R] Survfit error

2014-03-07 Thread Therneau, Terry M., Ph.D.
A fun discussion, but to get back to Thomas's too clever by half comment that started this, I went through some of these same thoughts a few years ago. I ended up asking the deeper question Why DO I want to fix this? It was a bad idea from the start. I once had a similar

Re: [R] What does the bandwidth at the bottom of periodogram mean

2014-03-07 Thread Uwe Ligges
See ?spec.pgram and look for bandwidth. Best, Uwe Ligges On 07.03.2014 15:53, Baro wrote: Hi experts if I run the code: k-c(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10) x.spec-spectrum(k,log=c(no)) at the bottom of dagram I have a bandwidth, what does it mean? [[alternative HTML

Re: [R] details of cor function

2014-03-07 Thread Greg Snow
For how to find the source code, see the help desk article in the October 2006 R news newsletter (http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf) which was the predacessor of the R journal. Have you looked at the variance of your jitters as well? that is what would make me more nervous

[R] Question: How Kolmogorov Test is computed by R function ks.test, using scaled difference or unscaled

2014-03-07 Thread chee chen
Dear All,   I would like to ask for your help on the following when testing uniformity by the KS test:   1.  We know that the Kolmogorov test is based on the supremum D of the difference between the empirical distribution and the uniform distribution 2.  We also know that sqrt(n)D has a limiting

Re: [R] Help with prob in sample()

2014-03-07 Thread Greg Snow
Oops, my answer was for when replace=TRUE, when replace=FALSE it uses a different method, but that method is described on the help page for sample. Essentially it chooses the first number, then removes that value from x and prob, then chooses the next (rescaling prob again), etc. On Fri, Mar 7,

[R] stratified sampling

2014-03-07 Thread Kristi Glover
Hi R users, I have been struggling to select the equal number of samples from each strata. I have the data collected in different years in different regions with different sample size. Basically, I have two two conditions (year and region). I wanted to make smaple sample size for both year and

Re: [R] stratified sampling

2014-03-07 Thread Bert Gunter
Why? Presumably you want to bootstrap the distribution of the mean -- but why? Anyway, if this is correct, the boot package can do this for you. -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is

[R] heatmap indexing x axis and y axis

2014-03-07 Thread Ankush Sharma
Dear all , I plotted a heat map of 20*20 matrix (lets say x axis and y axis comprises of alphabets A,D.G and so on) which contain multiple values for each entry in the dataset. I need to rearrange x axis and y axis on the basis of similar properties on x axis and y axis such as A E,H and

[R] Using comma as decimal mark in plots

2014-03-07 Thread Lotharster
Hi, I am preparing plots for a german publication. Therefore, I would like to use a comma as decimal mark instead of a point. How do I change this default in R? I could not find anything in the help pages, maybe you can help me out. Thanks, Lothar

[R] RJSONIO: toJSON integer conversion problem

2014-03-07 Thread M.van_Iterson
Dear all, I encounter a conversion problem with integers to JSON format. Are there any options in RJSONIO to make a proper conversion from int to int instead of int to float with the consequence of losing accuracy? Regards, Maarten doc - 8667053102 names(doc) - largeint toJSON(doc) [1]

[R] I have an error with frailtypack , multivePenal function

2014-03-07 Thread sahar masoudi
   my data with *.txt is :     T0  T1  I1  E1   E2 E3 V1   V2    V3 0.0 0.03634  1    1    0  0  1    0 0  0.03634 0.98215  1    1    0  0  1    0 0 0.0 0.66344  2    1    0  0  0  

[R] obtaining prediction intervals from lrm() in rms library

2014-03-07 Thread David Paul
Hi, Apologies if this is a silly question -- I am just now learning how to use some of the basic functions in the rms library. I have been using foo.dist - datadist(foo.frame) options(datadist='foo.dist') lrm.model - lrm(binary.outcome ~ rcs(contin.var,5)+categ.var, data =

[R] Fwd: Using comma as decimal mark in plots

2014-03-07 Thread Lotharster
Hi, I am preparing plots for a german publication. Therefore, I would like to use a comma as decimal mark instead of a point. How do I change this default in R? I could not find anything in the help pages, maybe you can help me out. Thanks, Lothar

[R] posting for R-help on the predict function and categorical variables in R

2014-03-07 Thread Roman, Sally (MRC)
Hi - I would like to post to the R-help mailing list. Here is my post: -This is more of a general question about how the predict function treats categorical variables and how to interpret the output from predict. I have a zeroinfl model to predict the number of animals encountered:

Re: [R] Fwd: Using comma as decimal mark in plots

2014-03-07 Thread Kehl Dániel
Hi, take a look at this old conversation. I do not know about an other workaround, but maybe somebody else will know something. As we also use commas in Hungary, I am also affected by this. https://stat.ethz.ch/pipermail/r-help/2002-January/018030.html HTH daniel

Re: [R] RJSONIO: toJSON integer conversion problem

2014-03-07 Thread jim holtman
try: toJSON(doc, digits = 20) Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Fri, Mar 7, 2014 at 4:07 AM, m.van_iter...@lumc.nl wrote: Dear all, I encounter a conversion problem with integers to

Re: [R] Fwd: Using comma as decimal mark in plots

2014-03-07 Thread David Carlson
Does setting OutDec work for you? options(OutDec=,) x - rnorm(50, mean=2, sd=0.1) y - rnorm(50, mean=2, sd=0.2) plot(x, y) # options(OutDec=.) to change it back if you want - David L Carlson Department of Anthropology Texas AM University College Station, TX

Re: [R] stratified sampling

2014-03-07 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Kristi Glover Sent: Friday, March 07, 2014 11:56 AM To: R-help Subject: [R] stratified sampling Hi R users, I have been struggling to select the equal number of samples from

Re: [R] Script question

2014-03-07 Thread Milton O Faison
My apologies. The crux of my question is why doesn't a script function the same when called from the source command as it does when cut and paste into R; however, I will provide the script, the correct output from cutting and pasting, and the faulty output from the source command within the

Re: [R] Script question

2014-03-07 Thread Richard M. Heiberger
Don MacQueen's answer was probably correct. Please see FAQ 7.16 for details. On Fri, Mar 7, 2014 at 9:51 PM, Milton O Faison mfai...@vsu.edu wrote: My apologies. The crux of my question is why doesn't a script function the same when called from the source command as it does when cut and

Re: [R] Script question

2014-03-07 Thread William Dunlap
Try adding the echo=TRUE argument to your source() comand, or perhaps just print.eval=TRUE. Bill Dunlap TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Milton O Faison Sent: Friday, March 07,

[R] Reading xlsx files in R

2014-03-07 Thread Orvalho Augusto
Dear Agony you did not place a subject on your message. That prevents people to help you. So I have corrected. About your problem. This seems to be related to memory allocated to Java Virtual Machine on rJava and has been comment online many times (eg:

[R] Data Frame to list?

2014-03-07 Thread Keith S Weintraub
Folks, I have a data frame as follows: foo-structure(list(name = c(A, B, C), num = c(3L, 2L, 1L)), .Names = c(name, num), row.names = c(NA, -3L), class = data.frame) str(foo) 'data.frame': 3 obs. of 2 variables: $ name: chr A B C $ num : int 3 2 1 foo name num 1A 3 2B

Re: [R] Data Frame to list?

2014-03-07 Thread Richard M. Heiberger
oof - as.list(foo$num) names(oof) - foo$name oof On Fri, Mar 7, 2014 at 10:41 PM, Keith S Weintraub kw1...@gmail.com wrote: Folks, I have a data frame as follows: foo-structure(list(name = c(A, B, C), num = c(3L, 2L, 1L)), .Names = c(name, num), row.names = c(NA, -3L), class =

Re: [R] Data Frame to list?

2014-03-07 Thread arun
Try: oof1 - list()  oof1[foo$name] - foo$num A.K. On Friday, March 7, 2014 10:43 PM, Keith S Weintraub kw1...@gmail.com wrote: Folks, I have a data frame as follows: foo-structure(list(name = c(A, B, C), num = c(3L, 2L, 1L)), .Names = c(name, num), row.names = c(NA, -3L), class =

[R] regular pentagon

2014-03-07 Thread Yuanzhi Li
Hello, everyone, Do you have any idea to get a set of random points within a regular pentagon? Thanks in advance! Yuanzhi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide