similar to: sliding window over a large vector

Displaying 20 results from an estimated 1000 matches similar to: "sliding window over a large vector"

2009 Feb 26
3
Moving Average
I am looking for some help at removing low-frequency components from a signal, through Moving Average on a sliding window. I understand thiis is a smoothing procedure that I never done in my life before .. sigh. I searched R archives and found "rollmean", "MovingAverages {TTR}", "SymmetricMA". None of the above mantioned functions seems to accept the smoothing
2023 Oct 31
1
weights vs. offset (negative binomial regression)
[Please keep r-help in the cc: list] I don't quite know how to interpret the difference between specifying effort as an offset vs. as weights; I would have to spend more time thinking about it/working through it than I have available at the moment. I don't know that specifying effort as weights is *wrong*, but I don't know that it's right or what it is doing: if I were
2009 Mar 28
1
Error in R??
Can someone explain why I am getting the following error: in the r code below? Error in solve.default(diag(2) + ((1/currvar) * (XX1 %*% t(XX1)))) : system is computationally singular: reciprocal condition number = 0 In addition: There were 50 or more warnings (use warnings() to see the first 50) The R code is part of a bigger program. ##sample from full conditional
2010 Aug 17
3
predict.lm, matrix in formula and newdata
Dear all, I am stumped at what should be a painfully easy task: predicting from an lm object. A toy example would be this: XX <- matrix(runif(8),ncol=2) yy <- runif(4) model <- lm(yy~XX) XX.pred <- data.frame(matrix(runif(6),ncol=2)) colnames(XX.pred) <- c("XX1","XX2") predict(model,newdata=XX.pred) I would have expected the last line to give me the
2011 Nov 17
1
Vectorizing for weighted distance
Hi All, I am trying to convert the following piece of matlab code to R: XX1 = sum(w(:,ones(1,N1)).*X1.*X1,1); #square the elements of X1, weight it and repeat this vector N1 times XX2 = sum(w(:,ones(1,N2)).*X2.*X2,1); #square the elements of X2, weigh and repeat this vector N2 times X1X2 = (w(:,ones(1,N1)).*X1)'*X2; #get the weighted 'covariance'
2003 Jul 08
2
Can anybody help me on this?
Hi there: I have this configuration: |-----[Server 2] | [Internet]--------[Router]----------[Switch]------------ [Server 1] | |-----[PC1] | |-----[PC2] | |-----[PC3] Server 1 has IP 216.251.XXX.XX1 Server 2 has IP 216.251.XXX.XX2 PC1 has IP 216.251.XXX.XX3 PC2 has IP 192.168.XXX.1 PC3 has IP 192.168.XXX.2 How do I configure shorewall in SERVER 2 to block to/from the Internet Port 22
2008 Dec 24
2
Using 'cat' on data frame
Dear all, I have the following data frame: > raw.count Var1 Freq 1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 707 2 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC 14 3 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT 3 But why when printint it using 'cat', it doesn't print the desired string "AAA" ? > cat(raw.count$Var1,
2007 Jan 30
2
dev IFB, few questions
I''ve made some tests... eth2 is my internal interface, LAN is connected here. Before I had IMQ device in AB mode... PREROUTING [A]fter NAT, POSTROUTING [B]efore NAT. I want the same situation on ifb. I do this in this way: --- # incoming traffic here from LAN is before NAT tc qdisc add dev eth2 handle ffff: ingress # outcoming traffic here from WAN is after NAT tc qdisc add dev eth2
2008 Dec 24
1
selecting a subset of a matrix based on a value occurring in 5 records
Hello, >I am hoping for some advice as to how I might create a subset of a >matrix. The matrix is 176 x 3530. The rows are individual records >and the columns words. I want to create a new matrix that only >consists of words which occur in at least 5 records. For example, >if column 7 is "charges" and this only appears in 4 records/rows >this variable would not
2007 Oct 14
1
iPhone 1.1.1 problems.
I'm having problems with the iPhone client in the 1.1.1 version of the iPhone software. Things with other clients work fine, and the iPhone worked fine before it was upgraded to 1.1.1. Other phones on 1.1.1 failed. I'm still working on testing against the client with the iPhone 1.0.2 software on it. The problem is that the client simply doesn't connect to dovecot. I can see the
2010 Jun 15
4
Unable to pickup an extension, tryi
Hi! > How to do this ?? > To proceed with your answer on PICKUPMARK, where do I put this ??? Look at the example for Asterisk 1.4 on this page: http://www.voip-info.org/wiki/view/Asterisk+cmd+Pickup Philipp
2007 Nov 01
2
ploting a comparison of two scores, including the labels in the plot
Hello r-help! I have data with two kind of ratings on status of 100 occupations. The first kind of rating is on the percieved "objective" status that these occupations have in society at large, and the second kind or rating is on the status that the respondents think that these occuption *should* have. The ratings were originally integer values in the rage 1-9, but in the current data,
1999 Feb 16
1
Missing tick marks bug on alpha solved
On some systems (alpha), tick marks don't appear on plots. The easiest way to see the problem is something like: > plot(0:1,axes=FALSE) > axis(1,1:2) The problem is in X11_Line(...) from .../src/unix/devX11.c, which is so short I've included the whole function below: static void X11_Line(double x1, double y1, double x2, double y2, int coords, DevDesc *dd) {
2007 Dec 20
2
factor manipulation: edgelist to a matrix?
Hello All, I have had considerable bad luck with attempting the following with for loops. Here is the problem: # Suppose we have a data.frame with the following data, which can be considered a type of edgelist (for those with networks backgrounds): # # V1 V2 # 1 A # 1 A # 1 B # 2 A # 3 C # 3 A # 3 C # 3 B # # I want the output of the function to produce a matrix, such that #each factor of
2020 Apr 28
2
Service Winbind stopped, what could be the reason ?
Hello dear Samba users, I recently faced an issue with samba (4.10.4) and winbind. The winbind service was stopped, so no user can acces to my samba share. I restart the winbind service, and all users can access to the share as usually... But I would like to understand why this issue occured. My samba server is a centos 7 linux, configured as domain member to a microsoft AD (windows server
2007 May 11
1
model seleciton by leave-one-out cross-validation
Hi, all When I am using mle.cv(wle), I find a interesting problem: I can't do leave-one-out cross-validation with mle.cv(wle). I will illustrate the problem as following: > xx=matrix(rnorm(20*3),ncol=3) > bb=c(1,2,0) > yy=xx%*%bb+rnorm(20,0,0.001)+0 > summary(mle.cv(yy~xx,split=nrow(xx)-1,monte.carlo=2*nrow(xx),verbose=T), num.max=1)[[1]] mle.cv: dimension of the split subsample
2009 Oct 05
1
gsub - replace multiple occurences with different strings
Hi, I search a way to replace multiple occurrences of a string with different strings depending on the place where it occurs. I tried the following; x <- c("xx y e d xx e t f xx e f xx") x <- gsub("xx", c("x1", "x2", "x3", "x4"), x) what I want to get is; x = x1 y y e d x2 e t f x3 e f x4 but what I get is; x = x1 y y e
2007 Jul 06
2
How does the r-distribution function work
I am trying to understand what rbinom function does. Here is some sample code. Are both the invocations of bfunc effectively doing the same or I am missing the point? Thanks, Pieter bfunc <- function(n1,p1,sims) { c<-rbinom(sims,n1,p1) c } a=c() b=c() p1=.5 for (i in 1:10000){ a[i]=bfunc(30,p1,1) } b=bfunc(30,p1,10000)
2010 Nov 28
1
faster base::sequence
Hello, Based on yesterday's R-help thread (help: program efficiency), and following Bill's suggestions, it appeared that sequence: > sequence function (nvec) unlist(lapply(nvec, seq_len)) <environment: namespace:base> could benefit from being written in C to avoid unnecessary memory allocations. I made this version using inline: require( inline ) sequence_c <- local( {
2008 Oct 02
1
nls with plinear and function on RHS
Dear R gurus, As part of finding initial values for a much more complicated fit I want to fit a function of the form y ~ a + bx + cx^d to fairly "noisy" data and have hit some problems. To demonstrate the specific R-related problem, here is an idealised data set, smaller and better fitting than reality: # idealised data set aDF <- data.frame( x= c(1.80, 9.27, 6.48, 2.61, 9.86,