similar to: R equivalent of Beaton's Sweep algorithm

Displaying 20 results from an estimated 120 matches similar to: "R equivalent of Beaton's Sweep algorithm"

2003 Oct 17
3
don't display rulers in image() command and script file input
Dear R experts, 1. How can I turn off the display of rulers in image() command? 2. Rather than typing my commands at the command line, how can I input a file contents aside from doing a copy and paste operation? Thanks in advance, Ernesto Adorio Math Department University of the Philippines Diliman
2003 Oct 21
4
interactive prompts
Am using R on a Linux box and am currently writing an interactive R script. 1. How do I ask a user to press any key to continue ? I used a system call to read but this only works if the Enter key is pressed: print("Press any key to continue") system("read") 2. How do I get a string input from the user? Would like to see an R function, say askget(): delay =
2008 Jun 12
4
Background thread - entension code - switch contexts
Hi, I am using wxRuby 1.9.7 and Ruby 1.8.6. I have built an extension in C++ and used swig to load it into Ruby interpreter, which works great. The extension is an often long executing algorithm, and I''ve noticed that if I fork a new Ruby thread in button clicked event, and in this thread run the algorithm the application freezes for the time of execution. I have looked through the
2001 Jan 23
4
rehuff
Hiya, Here is the sources to my "rehuff" program. ./rehuff in.ogg out.ogg does a lossless recoding of a vorbis stream. (It generates optimal huffman codes for the particular stream). This code is meant for developers only, until someone is kind enough to provide good build and configure support for it. I won't. And no installation help questions please. There is a little patch
2011 Oct 31
3
How to use IML with R and SAS
Hello, I have a for loop that generates data in R. With the IML program, I would like to analyze data in SAS from each iteration of the for loop in R. It would be helpful if someone could explain to me how to analyze data this way. Thanks [[alternative HTML version deleted]]
2006 Jan 20
1
Passing variable arguments to functions
Hi, Is there another way to pass arguments via a vector to arbitrary functions as in the following code example without using a series of if else statements? f <- test(func, x, parms, fargs1, fargs2, ...) { # parms is a vector of parameters to func. # ... is for use by f, not by func. n <- length(parms) if (n == 0) y <- func(x) else if (n == 1) y <- func(x,
2006 Oct 31
1
[ggplot] controlling axis and major/minor tick marks
Hello there! I'm starting with ggplot and was wondering how I could control the axis of a plot. I would like the axis of the plot to be drawn black which I thought to acheive with the option axis.colour="black". However, this had no real effect on the plot. Then I found grid.colour which I changed to black as well. Now I got my axis as I wanted them, but ggplot now draws the grid
2006 Jul 06
5
What is require ''digest/sha1''?
In http://www.aidanf.net/rails_user_authentication_tutorial there is a string called require ''digest/sha1'' in the model. What does it do? Everything else is well explained besides that. -- Posted via http://www.ruby-forum.com/.
2006 Apr 24
3
AJAX drag and drop sorting with pagination
Drag and drop sorting is great but if you had a list of, say, 100 items, you''d probably want to show only 10 per page. Has anyone seen any way to use the a drag and drop style sorting method over a number of pages? I see it working by having the displayed list sortable as normal then an item is moved to the next page by dragging it onto the ''next'' link... maybe...
2004 Mar 19
3
Reading Data
Hi, Quick question on reading data. I am running simulations but want to allow the user the option to define the number of simulations. How can I have R read-in user data entered from the keyboard? Is there a difference for reading in numeric and character data? For example, I am trying to write the following in R: Enter Number of Iterations? <<<the user then enters a number say Y
2006 Jul 12
0
Odd "sweep" error on older code
I''ve got a Rails project that has been on the shelf for a few months, and I''m picking it back up. I''ve frozen Rails at 1.1.4 in vendor/, and did the "rails ." and "rake rails:update" to get it up to a current Rails level. The code initially seems to be working fine, but when I go to my login method, I get a 500 error thrown. Looking in the
2007 Jun 29
1
sweep sanity checking?
A friend of mine just got bitten by the fact that sweep() will happily sweep out a STATS vector of an arbitrary length -- even one whose length is not a divisor of any of the margins -- without complaining. I know the answer to this could be "well just don't do that", but it's easy to make a mistake in which margin you're sweeping ... What would R-core think of the
2005 May 09
0
Sweep statistics
Dear List: I am wondering if there is a more efficient way to compute the following. For the example I am using the star data frame in the mlmRev package. This has 80 schools and includes grades K, 1, 2, and 3. First I compute the grade level mean in each school using tapply as: tapply(star$math, list(star$sch,star$gr), mean, na.rm=T) This results in a table of means by school for each grade.
2009 Dec 16
1
difference between the meaning of MARGIN in sweep() and apply()
For example, subtracting 1:2 from the rows of a two-column matrix: > t(apply(matrix(1:6,ncol=2),MARGIN=1,function(y) y - 1:2)) [,1] [,2] [1,] 0 2 [2,] 1 3 [3,] 2 4 > sweep(matrix(1:6,ncol=2),MARGIN=2,1:2,FUN="-") [,1] [,2] [1,] 0 2 [2,] 1 3 [3,] 2 4 Is there a logic to this difference, or is it just a quirk of the history of these
2010 Jul 22
0
sweep / mapply question
Dear list, I have a matrix, spc, that should row-wise be interpolated: E.g. spc <- matrix (1:1e6, ncol = 250, nrow = 4000, byrow = TRUE) spc [1:10, 1:10] shifts <- seq_len (nrow (spc)) wl <- seq_len (ncol (spc)) interpolate <- function (spc.row, shift, wl) spline (wl + shift, spc.row, xout = wl, method = "natural")$y interpolate (spc [1,], shift = shifts [1], wl = wl)
2010 Aug 11
0
sweep and zoo objects
rc<-list(c( 123,321,234,543,654,768,986,987,246,284),c("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")) # the matrix has rownames that are used as identifiers and columns # of time. 1 years worth of data. Thats the native format
2009 Mar 17
2
sweep?
I am having a hard time understanding just what 'sweep' does. The documentation states: Return an array obtained from an input array by sweeping out a summary statistic. So what does it mean "weeping out a summary statistic"? Thank you. Kevin
2010 Nov 18
3
sweep by levels of a factor
Hi, I'd appreciate help with this. I have a data matrix with one column, called f in the example below, a factor. I'd like to subtract the means from each of other columns for each level of the factor. That is, in the example, to go from the first matrix below to the second. I know SWEEP will take out means, but I want to do this for each level of the factor. f x 1 2 1
2004 Aug 06
0
please test rc2 support in sweep :)
Hi, I'm updating speex support in sweep to RC2 and I'd like some advice on encoder options, and would appreciate some testing of the user interface. a screenshot of the updated speex encoding dialog: http://www.vergenet.net/~conrad/tmp/sw_speexRC2_1.png you can grab a tarball of sweep for testing here: http://www.vergenet.net/~conrad/tmp/sweep-0.8.0-speexRC2.tar.gz general
2012 Aug 04
1
how to coerce the result of sweep to be an array if result of FUN is a string?
Hi, I would like to use sweep to "sweep out" proportions and confidence intervals for an array, however when I supply a function which returns a string (containing something like "9% (3-18%)") I get back a list instead of an array, here is a simplified example: # example showing that sweep does not return an array with same dimensions as STATS as advertised