Displaying 20 results from an estimated 3000 matches similar to: "help with function filter"
2008 Jun 09
0
ayuda con la funcion filter
Hola
Necesito crea una funcion usando filter que en vez de sustituir los datos por los puntos de alrededor lo haga por la mediana.
Puedo utilizar esta funcion de esta manera para utilizar la media y para utilizar la mediana
filter(MATDINAMIC$VELOCIDADFIN[1:1000],rep(1/3,3))
filter_mediana <- filter(MATDINAMIC$VELOCIDADFIN[1:1000],rep(3,3))
COmo puedo identificar cuando uso la
2010 Sep 08
6
'par mfrow' and not filling horizontally
Greetings, Folks.
I'd appreciate being shown the way out of this one!
I've been round the documentation in ever-drecreasing
circles, and along other paths, without stumbling on
the answer.
The background to the question can be exemplified by
the example (no graphics window open to start with):
set.seed(54321)
X0 <- rnorm(50) ; Y0 <- rnorm(50)
2011 Jun 11
0
Is there an implementation of loess with more than 3 parametric predictors or a trick to a similar effect? [re-posting as plain text to pass char-set filter]
Dear R experts,
I have a problem that is a related to the question raised in this earlier post
??? https://stat.ethz.ch/pipermail/r-help/2007-January/124064.html
My situation is different in that I have only 2 predictors
(coordinates x,y) for local regression but a number of global
("parametric") offsets that I need to consider.
Essentially, I have a spatial distortion overlaid over a
2004 Jul 07
3
KalmanSmooth problem
Hello,
In R I am trying to use Kalman filtering to find a solution for an hydrological problem. With Kalman Filtering I want to estimate the discharge comming from three storage bassins. I have programmed a function in R which can run KalmanSmooth. When I'm asking for the function and putting in values, R detects the following error: "Error in as.vector(data) : Argument "S1" is
2009 Oct 08
2
lattice: passing multiple lty values to the key/legend
hi all,
It's not clear to me how (or if) I can pass multiple values for lty to a key in xyplot?
I've tried: lines=list(lty=1:3), to no avail.
Do I need to use something other than auto.key?
(Deepayan, if you're out there, I have your book and must admit the answer isn't jumping out at me.)
thanks in advance!
Michael Folkes
example code:
#____________________________
2002 Jan 06
3
puzzling error message
Hi
RedHat 7.2, ext3 on /, kernel 2.4.18p1.
whilst updatedb was running, i had these messages appear...
Jan 6 22:18:42 jaguar kernel: EXT3-fs error (device ide0(3,3)):
ext3_readdir: bad entry in directory #147553: rec_len %% 4 != 0 -
offset=0, inode=1651076143, rec_len=19527, name_len=85
Jan 6 22:18:42 jaguar kernel: EXT3-fs error (device ide0(3,3)):
ext3_readdir: bad entry in directory
2010 Mar 12
4
Getting multiple matrix-values using a single command
Dear all!
I'm trying to get multiple values from a matrix by using a single
command.
Given a matrix A
A <- matrix(seq(1,9),nrow=3,ncol=3)
How can I get e.g. the values A[1,2] = 4 and A[3,3] = 9 with a single
command and without using any loop? My first idea was to generate a
row- and a column vector for the indices, i.e. c(1,3) indicating row
number 1 (for A[1,2]) and row number
2010 Apr 28
1
Problem with optimization (constrOptim)
Hello,
I have the following problem:
I have a set of n matrix equations in the form of :
[b1] = [A] * [b0]
[b2] = [A] * [b1]
etc.
vertical vectors [b0], [b1], ... are GIVEN. We try to estimate matrix A. As
there are many equations (more than cells in matrix A) the system has no
solutions.
A is transition matrix (stochastic matrix) or markov process, so the sum of
each row = 1 and each entry is
2011 Apr 11
3
Coding matrix equation
Hi all,
I have two matrices:
G<-matrix(c(2.0, 0.5, 0.5, 0.5, 2.0, 0.5, 0.5, 0.5,2.0),3,3)
P<-matrix(c(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5,1.0),3,3)
and I want to run this equation to get a new matrix F:
F = [P+2G]^-1/2 P [P+2G]^-1/2
Could someone please tell me how to code this in R?
Many thanks in advance for your time.
Best wishes,
Matt
[[alternative HTML version deleted]]
2000 Oct 18
3
Locking propigation probelm samba to netatalk & netatalk to samba
Take a look at this output from lsof:
smbd 11490 0 8u REG 3,3 55296 1136647 Maintenanc.fp5
afpd 31010 0 2u REG 3,3 3207 1136655 auction - envelope.rtf
afpd 31010 0 5u REG 3,3 4156 1136656 Word Work File L 1
afpd 31010 0 8u REG 3,3 55296 1136647 Maintenanc.fp5
smbd 31386 0 9u REG 3,3 4156 1136656 Word Work
2001 Sep 24
4
part of files in another file after crash
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
because of strange reasons my notebook sometimes crashes short after startup
(but that's not ext3's fault, maybe mem?, when i wait several minutes it
works without problems)
the problem is that after 3 crashes at startup, when my notebook finally
worked i got the msg:
Sep 23 23:29:17 blackbox kernel: EXT3-fs warning (device ide0(3,3)):
2011 Dec 21
2
unique combinations
Hi there,
I have a vector and would like to create a data frame, which contains
all unique combination of two elements, regardless of order.
myVec <- c(1,2,3)
what expand.grid does:
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
what I would like to have
1,1
1,2
1,3
2,2
2,3
3,3
Can anybody help?
2001 Dec 17
2
Indole
Dear Manager:
Thanks in advance for your interest,
We mainly produces are Indole series (indole, 3,3'-Methylenebisindole ,
5-methoxy indole)
Indole >99%
POWDER loss on drying: 1%
white slight yellow crystalline powder
CRYSTAL melting point: 51-53
loss on drying: 0.5%
white sheetform crystal
2012 Dec 19
2
probability of binary data
Hi, how are you?
I am trying to replicate the binary data f(2) function in the attached
document by starting with the simple example found below:
observed <- matrix(c(0, 1, 0, 0, 1, 1, 1, 0, 0),3,3,byrow=TRUE)
data <- matrix(c(1, 1, 0, 0, 1, 0, 0, 0, 1),3,3,byrow=TRUE)
f2 = sum(probability of the matrix element where the matrix element is
present in both the observed and the
2005 Oct 06
3
Singular matrix
Dear All,
I have written the following programs to find a non-singular (10*10) covariance matrix.
Here is the program:
nitems <- 10
x <- array(rnorm(5*nitems,3,3), c(5,nitems))
sigma <- t(x)%*%x
inverse <- try(solve(sigma), TRUE)
while(inherits(inverse, "try-error"))
{
x <- array(rnorm(5*nitems,3,3), c(5,nitems))
sigma <- t(x)%*%x
inverse <-
2010 Mar 15
5
storing matrix(variables) in loop
Hello R-helpers,
I have the following code that works well,
b <-list()
for (i in 1:3){
a <- matrix(runif(1),3,3)
b[[i]] <- a
}
b
however, I need to do something similar with two loops and I was looking for
something that would look like
b <- list()
for (i in 1:3){
for (j in 1:4){
a <- matrix(runif(1),3,3)
b[[i,j]] <- a #but this doesn?t work
}
}
Anyway, I wanted
2002 Mar 13
1
controlling figure dimension/location
I'm making two plots, one on top of the other. On the upper plot, I do
not print the x-label or the x-tick-label. To reduce space, I'd like to
keep the white space between the two figures at a minimum. However, I
can't figure out how to methodically reduce the space while maintaining
the same figure dimensions for both plots. I could add margin space
below the lower plot and reduce
2009 Oct 08
1
problem understanding factor levels for use lattice panel order
Hello all,
In order to get the desired order of panels within lattice I realized I needed to define my factor levels.
I now see how to properly do it (attached code), but:
1. I don't understand why I have to use factor() on a variable that is already a factor, and why levels() alone doesn't work to readjust the level order.
2. I just noticed that if I do use levels(xx$v1), it's
2004 Jun 02
2
a fault in the "hist" - function (PR#6931)
Full_Name: Stephan Schlueter
Version: 1.9.0
OS:
Submission from: (NULL) (217.184.109.24)
During my studies, I found a fault in the hist()-function:
If you have a vector x with values around zero and also bigger than 10,000,000 ,
there will be a shift of -max(x)/10,000,000 in the hist-datas.
See my example:
x<-runif(10000)
hist(x,breaks=c(seq(-3,3,0.1)),prob=TRUE)
#everything ok, but
2008 Jul 22
4
Is text(..., adj) upside down? (Or am I?)
?text says
"'adj' allows _adj_ustment of the text with respect to '(x,y)'.
Values of 0, 0.5, and 1 specify left/bottom, middle and
right/top,
respectively."
But it looks like 0, 1 specify top, bottom respectively in the y
direction.
plot(1:4)
text(2,2, "adj=c(0,0)", adj=c(0,0))
text(2,2, "adj=c(0,1)", adj=c(0,1), col=2) #the red