similar to: Sliding Window in R (solved)

Displaying 20 results from an estimated 300 matches similar to: "Sliding Window in R (solved)"

2012 Mar 03
4
Sliding a Window in R
Dear all, I am having a vector of around 300.000 elements and I Want to slide fast a window from the first element until the last-Windowsize what I have so far is the following for statement:  for (i in 1:(length(data[,1]) - windowSize)) {         out[i] <- mean(data[i:(i + windowSize - 1), ])         elements[i]<-length(i:(i + windowSize - 1))       } but this of course takes ages to
2011 Nov 01
1
Nested lapply? Is this allowed?
Dear all, I want for a given data set to call a funciton many time. That bring us all to the notion of lapply (or any other variance). My problem is that this data set should also be created from another lapply As for example   DataToAnalyse <- return_selected_time_interval(TimeStamps,Time[[1]], Time[[2]])  # Where Time[[1]] and Time[[2]] are lists   
2012 Feb 21
2
In R 2.14.1, what does wrong sign in 'by' argument mean?
Here is my code slidingwindowplotATGC = function(windowsize, inputseq) { starts = seq(1, length(inputseq)-windowsize, by = windowsize) n = length(starts) chunkGs = numeric(n) chunkAs = numeric(n) chunkTs = numeric(n) chunkCs = numeric(n) for (i in 1:n) { chunk = windowsize[starts[i]:(starts[i]+9999)] chunkG = sum("g" ==
2007 Feb 20
1
baseline fitters
I am pretty pleased with baselines I fit to chromatograms using the runquantile() function in caTools(v1.6) when its probs parameter is set to 0.2 and its k parameter to ~1/20th of n (e.g., k ~ 225 for n ~ 4500, where n is time series length). This ignores occasional low- side outliers, and, after baseline subtraction, I can re-adjust any negative values to zero. But runquantile's
2005 Jul 18
1
[PATCH] remove unused encoder buf in sb_celp.[hc]
diffed against http://svn.xiph.org/trunk/speex r9583 Index: libspeex/sb_celp.c =================================================================== --- libspeex/sb_celp.c (revision 9583) +++ libspeex/sb_celp.c (working copy) @@ -272,7 +272,6 @@ st->g0_mem=speex_alloc((QMF_ORDER)*sizeof(spx_word32_t)); st->g1_mem=speex_alloc((QMF_ORDER)*sizeof(spx_word32_t)); -
2005 Nov 24
2
Source throttling bug, windows->linux
I'm getting a weird source throttling bug that I just don't know how to track down. Source is windows shoutcast 1.9.0 winamp plugin (XP up to date, and possibly others) Server is 2.3.0 It works fine for quite a while, then I get the following wierdness on tcpdump and it goes to hell: 21:03:54.601871 IP (tos 0x0, ttl 64, id 27852, offset 0, flags [DF], length: 40) server.8001 >
2011 Sep 23
0
(Requested) caTools::runmean Patch
Dear Mr. Tuszynski, I would like to request what I believe would be a beneficial update / patch to the runmean() function in the caTools package. Consider the following R>> x = 1:100 R>> is.integer(x) [1] TRUE R>> library(caTools) R>> head(runmean(x, 5, alg="exact")) [1] 8.487983e-314 1.060998e-313 1.273197e-313 1.697597e-313 2.121996e-313 2.546395e-313
2005 Oct 29
1
***SPAM*** pre-echo preventing
Hi! Dear all I compressed an audiu(wave) with libvorbis1.1.1 and found that the pre-echo was longer than the one which was compressed with MP3 at the same bitrate(128kbps),I am now confused aboout the pre-echo preventing scheme. Can you tell me what method does Ogg Vorbis adopt besides the auto windowsize switch? Looking forward to your letter! Thank you! ??????? Lisa (^_^)
2000 Sep 26
3
anoying debug info + can't login automaticaly
Howdy, I'm installing openssh 2.2.0p1 on a number of SUNs running Solaris 2.6 but ran into a few problems: 1. whenever I run a remote X11 application and f.i. change the windowsize I get anoying debug messages like debug: client_check_window_change: changed This is a problem since I want to use openssh in a production environment. Is there any way to turn these messages off?
2008 Apr 10
2
QP.solve, QPmat, constraint matrix, and positive definite
hello all, i'm trying to use QPmat, from the popbio package. it appears to be based on solve.QP and is intended for making a population projection matrix. QPmat asks for: nout, A time series of population vectors and C, C constraint matrix, (with two more vectors, b and nonzero). i believe the relevant code from QPmat is: function (nout, C, b, nonzero) { if (!"quadprog" %in%
2010 Jun 19
1
more powerful iconv
R community, As you may know, R's iconv doesn't work well converting to and from encodings that allow embedded nulls. For example > iconv("foo", to="UTF-16") Error in iconv("foo", to = "UTF-16") : embedded nul in string: '\xff\xfef\0o\0o\0' However, I don't believe embedded nulls are at issue here, but rather that R's iconv
2023 Feb 23
1
Compilation Error when DEBUG_approx Toggled on in RISC-V
Hi all, While compiling R to RISC-V64 architecture and debugging in R's C source codes, I think I have found a small bug. Can anyone please verify whether it is a real bug? The possible bug lies in the file `R-4.2.2/src/library/stats/src/approx.c` in function `R_approxfun` around line 148: #ifdef DEBUG_approx REprintf("R_approxfun(x,y, nxy = %.0f, .., nout = %.0f, method = %d,
2003 May 25
0
Fitting an ARIMA model to a time series
R 1.6.2 on windows XP (and windows 2000) Dear Readers, I have to fit an ARIMA model to a blood pressure series to make predictions with it. But since I don't have a blood pressure data set yet I have to work with self made data. So I have created an AR( 2 ) series with the following code: series <- list() series$series <- arima.sim(n=2100, model=list(ar = c(0.6, 0.1)), sd=1) + 120
2010 Feb 16
3
error : unused argument(s) when boxplot
Dear all, I am a total beginner in R, so sorry if this is the wrong place. I am using R 2.10.1 on a Mac (Mac OS 10.6.2). I have this small dataset : growth sugar 75 C 72 C 73 C 61 F 67 F 64 F 62 S 63 S I have no problem reading the table, or getting the summary, but if I try boxplot(growth~sugar, ylab="growth", xlab="sugar", data=Dataset), I have the following error :
2004 Apr 18
2
outliers using Random Forest
Hello, Does anybody know if the outscale option of randomForest yields the standarized version of the outlier measure for each case? or the results are only the raw values. Also I have notice that this measure presents very high variability. I mean if I repeat the experiment I am getting very different values for this measure and it is hard to flag the outliers. This does not happen with two other
2002 Sep 16
1
Running Median and Mean
R gurus, On Aug 20, 2002, I asked in R-help about calculating a running 5-day median on a large matrix. Thanks to Martin Maechler <maechler@stat.math.ethz.ch> and Ray Brownrigg <Ray.Brownrigg@mcs.vuw.ac.nz> for responding. I ended up writing C code (and an R interface) to do it, which is about 1000x faster than the naive method! (72s became .09s on a 223 x 520 matrix). I added a
2005 Jun 17
0
Release of new version of caMassClass package and new package caT ools
Hi, A new version of "caMassClass" package was released today. The package contain pipeline for processing and classification of protein mass spectra data. The main change is off-spinning from the library collection of generic functions into a new package "caTools". This package, which might be useful to broader group, is much smaller than "caMassClass" and has fewer
2005 Jun 17
0
Release of new version of caMassClass package and new package caT ools
Hi, A new version of "caMassClass" package was released today. The package contain pipeline for processing and classification of protein mass spectra data. The main change is off-spinning from the library collection of generic functions into a new package "caTools". This package, which might be useful to broader group, is much smaller than "caMassClass" and has fewer
2012 Aug 23
0
MALDIquant
Dear list, My name is Juan Fernandez-Tajes and I´m trying to use MALDIquant for analysing MS data from ABI 4700 series, I´ve exported a spot set to T2Dextractor in order to convert in mzXML format. I´ve imported this into R with mqReadMzXml function and have followed the suggested flowchart, however when I´m in the step for peak detections I obtained the following error: peaks <-
2005 Sep 20
3
annotating an axis in bwplot (lattice)
Hi, I'd like to add, say, the sample size for every group in a bwplot as a parenthetical annotation to the axis. Here's a sketch: --8<---------------cut here---------------start------------->8--- require(Hmisc) age <- sample(1:100, 1000, replace = TRUE) sex <- gl(2, 8, 1000, c("Male", "Female")) grp <- gl(4, 6, 1000, letters[1:4]) bwplot(grp ~ age |