Displaying 20 results from an estimated 10000 matches similar to: "filter data set unique, duplicate.."
2011 Mar 25
4
read.xls -> rotate data.frame
Hi to all,
how could I to rotate automatically a data sheet which was imported by
read.xls?
x1 x2 x3 .... xn
y1 1 4 7 ... xn/y1
y2 2 5 8 .... xn/y2
y3 3 6 9 ....xn/y2
yn ... ... ... Xn/Yn
to
y1 y2 y3 .... yn
x1 1 2 3 ..... Yn/x1
x2 4 5 6 .... Yn/x2
x3 7 8 9 .... Yn/x2
xn ... ... ... ..... Yn/xn
Kind regards Knut
2007 Dec 26
1
Can you recover default argument values of a function?
Hi.
Maybe this is a stupid question. If so, I apologize, but here goes. Suppose I have a function f1(x,...) that calls a function f2(y1,y2,...,yn) in the following way: if x satisfies a certain condition, then I want to call f2(x,y2,...,yn); otherwise I want to use the default value of y1, if there is one. I could do something like the following:
v <- ifelse ( is.null(x), f2( , y2,...,
2007 Sep 14
2
quantiles and dataframe
Hi
I have a dataframe, RQ, like this:
A B1 B2 B3
1 NA 112 12
2 NA 123 123
3 NA 324 13
4 3 21 535
5 4 12 33
6 7 1 335
7 4 NA 3535
8 4 NA NA
9 NA NA NA
10 5 NA NA
12 4 NA NA
15 2 NA NA
17 3 NA 1
63 1 NA 1
75 NA NA NA
100 NA NA NA
123 NA NA
2008 Jun 24
2
persp plot
I have a set of data in the form
x1, y1, z1
x1, y2, z2
...
x1, yN, zN
x2, y1, z(N+1)
x2, y2, z(N+2)
...
x2, yN, z(2N)
...and so on...
xM, yN, val(M*N)
I have been trying to figure out how to get R to use this data in a
persp plot. So far the only thing that I can figure out to do is to
break the data file into three different files. The first file
contains the x-coordinate data:
x1
x2
2009 Dec 24
2
how to do multiple responses in a linear regression
Hi,
I have multiple responses y1, y2, .., yn, and would like to do linear
regression for each of them with x1, x2, ..., xm. Instead of doing
regression n times, it it possible to do it all at once?
I tried lm(y1+y2 ~ x1 + x2 + x3) and lm added y1 y2 and then did the
regression.
thanks
Jeff
2012 Feb 23
5
cor() on sets of vectors
suppose I have two sets of vectors: x1,x2,...,xN and y1,y2,...,yN.
I want N correlations: cor(x1,y1), cor(x2,y2), ..., cor(xN,yN).
my sets of vectors are arranged as data frames x & y (vector=column):
x <- data.frame(a=rnorm(10),b=rnorm(10),c=rnorm(10))
y <- data.frame(d=rnorm(10),e=rnorm(10),f=rnorm(10))
cor(x,y) returns a _matrix_ of all pairwise correlations:
cor(x,y)
2011 Mar 09
4
Extracting only odd columns from a matrix
Hi,
This might seem like a simple question but at the moment I am stuck for ideas. The columns of my matrix in which some data is stored are of this form:
X1 Y1 X2 Y2 X3 Y3 ... Xn Yn
with n~100. I would like to look at just the X values (i.e. odd column numbers). Is there an easy way to loop round extracting only these columns?
Any help would be appreciated.
2012 Oct 10
3
Generating random geographical coordinates
Dear all,
I have two coordinates vectors, say X and Y of length n.
I want to generate for each couple of coordinates X1,Y1 X2,Y2
X3,Y3....Xn,Yn a random coordinate which is located in a square define
as X +/- dx and Y +/- dy.
I saw the runif function which can generate for just one value at a time
what I want : runif(1, X - dx, X + dx) for X and runif(1, Y - dy, Y +
dy) for Y.
I would like
2011 Mar 14
3
Finding coordinates for maximum of a function
Hello R,
I have data in txt file of n columns like this:
x y1 .....yn
1 100
2 50
3 10
4 200
5 20
I need to find coordinates for each maxima e.g.: [x,y1],[x,y2]...[x,yn]
a=read.table()
attach(a)
b=y1<-x
max(b) returns only value of y but no corresponding x value
--
View this message in context:
2007 Mar 01
1
covariance question which has nothing to do with R
This is a covariance calculation question so nothing to do with R but
maybe someone could help me anyway.
Suppose, I have two random variables X and Y whose means are both known
to be zero and I want to get an estimate of their covariance.
I have n sample pairs
(X1,Y1)
(X2,Y2)
.
.
.
.
.
(Xn,Yn)
, so that the covariance estimate is clearly 1/n *(sum from i = 1 to n
of ( X_i*Y_i) )
But,
2011 Mar 04
2
Reading in and manipulating multiple data sets from the same input file
Hi,
I am attempting to write code which will read in my data which is of this
form:
X1 Y1 X2 Y2 .... Xn Yn
0 0 0 0 0 0
1 0 1 255 1 0
2 255 2 0 2 255
3 0 3 0
2007 Feb 08
1
the plotting position of theoretical quantile for qqnorm
Hello,
I have a doubt about the plotting position of the theoretical quantile for
the qqnorm
command in R.
Let F be the theoretical distribution of Y, we observed a sample of size n,
y1,y2, ...,
yn. We then sort it and comspare these empirical quantiles to the expected
ones
from F. For the plotting poition, there are several options:
1. i/(n+1)
2. (i-.375)/(n+.25)
3. (i- .3175)/ (n + .365)
etc.
2012 Apr 11
1
inference for customized regression in R?
Hi all,
Are there functions in R that could help me do the following?
We have a special type of regression which is called Geometric Mean
Regression.
We have done some search and found the following:
https://stat.ethz.ch/pipermail/r-help/2011-July/285022.html
The question is: how to do the statistical inference on GMR results?
More specifically, we are looking for the prediction interval:
2010 Oct 24
6
Contour Plot on a non Rectangular Grid
Dear All,
I would like to plot a scalar (e.g. a temperature) on a non-rectangular
domain (or even better: I would simply like to be able to draw a contour
plot on an arbitrary 2D domain). I wonder if there is any tool to
achieve that with R. I did some online search in particular on the list
archives, found several queries similar to this one but was not able to
find any conclusive answer.
I
2009 Dec 15
1
Help in R
Hello,
Can anyone give me some suggestion in term of calculating the sum below.
Is there a function in R that can help doing it faster?
x1, x2, ...xn where xi can be 0 or 1. I want to calculate the following:
sum{ beta[a+sum(xi), b+n-sum(xi) ]* [ (1-x1)dnorm(0,1)+x1dnorm(2,1) ]* [
(1-x2)dnorm(0,1)+x2dnorm(2,1) ]* ...* [ (1-xn)dnorm(0,1)+xndnorm(2,1) ] }
The sum in the beginning is over all
2009 Apr 03
1
Trouble extracting graphic results from a bootstrap
Hi,
I'm trying to extract a histogram over the results from a bootstrap. However
I keep receiving the error message "Error in hist.default(boot.lrtest$ll,
breaks = "scott") : 'x' must be numeric".
The bootstrap I'm running looks like:
> boot.test <- function(data, indeces, maxit=20) {
+ y1 <- fit1+e1[indeces]
+ mod1 <- glm(y1 ~ X1-1, maxit=maxit)
+
2012 Jun 30
5
Máxima Verosimilitud
Hola.
Como hago para calcular la "Maxima Verosimilitud" de unos datos con
distribucion uniforme?
saludos.
--
Leo
[[alternative HTML version deleted]]
2017 Aug 22
1
Error: mdbox .../storage: Duplicate GUID
Hi!
When I force-resync a mailbox of mine, I see following output:
# doveadm force-resync -u $USER $PATH
doveadm($USER): Warning: mdbox .../storage: Inconsistency in map index ($X,$Y2
!= $X,$Y2)
doveadm($USER): Warning: fscking index file .../storage/dovecot.map.index
doveadm($USER): Warning: mdbox .../storage: rebuilding indexes
doveadm($USER): Error: mdbox .../storage: Duplicate GUID $G in
2003 Dec 19
1
iterative proportional fitting
Dear all,
I wonder if there are some function or package in R which can do the
iterative proportional fitting.
In the exponential model
f(y1,...yn)=exp(a'yi+b'(yi*yj)+.....+c'(y1*...*yn)+constance),
instead of the canonical parameters, I use maginal probability instead of a
and log odds ratio instead of b. and for the order higher than 3, I use the
canonical way or even assume
2003 Apr 24
1
duplicate password prompt
I'm running samba 2.2.8a on a redhat 9 box, everything works great, but
ever since I playd with the system-auth I now have to enter a password
in twice when I logon to the console.
Any one got any ideas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Iwan Davies
Server Support and Development Technician
Cyngor Sir Ceredigion County Council
IT Section
Finance
iwandav@ceredigion.gov.uk