Displaying 20 results from an estimated 1100 matches similar to: "make one matirx in list after removing duplicated rows"
2007 Aug 16
6
an easy way to construct this special matirx
Hi,
Sorry if this is a repost. I searched but found no results.
I am wondering if it is an easy way to construct the following matrix:
r 1 0 0 0
r^2 r 1 0 0
r^3 r^2 r 1 0
r^4 r^3 r^2 r 1
where r could be any number. Thanks.
Wen
[[alternative HTML version deleted]]
2009 Apr 11
2
who happenly read these two paper Mohsen Pourahmadi (biometrika1999, 2000)
http://biomet.oxfordjournals.org/cgi/reprint/86/3/677 biometrika1999
http://biomet.oxfordjournals.org/cgi/reprint/94/4/1006 biometrika2000
Hi All:
I just want to try some luck.
I am currenly working on my project,one part of my project is to
reanalysis the kenward cattle data by using the method in Mohsen's paper,but
I found I really can get the same or close output as he did,so,any
2010 Apr 16
3
VERY SIMPLE QUESTION
Dear R users,
I am looking for more efficient way to compute the followings
--------------------------------------------------------------------------
a <- matrix(c(1,1,1,1,2,2,2,2),4,2)
b <- matrix(c(1,2,3,4),4,1)
Eventually, I want to get this matrix, `c`.
c <- matrix(c(1/1,1/2,1/3,1/4,2/1,2/2,2/3,2/4),4,2)
--------------------------------------------------------------------------
2008 Jun 20
2
3D histogram
Hii..
Could anyone please tell me how to draw 3D histogram in R
I have a 20X3 matirx. Now I want 2 of the variable on X and Y axis .And
Height of the bar should denote the value of third variable.
Thanx
Sumit
[[alternative HTML version deleted]]
2009 Mar 27
1
interactive image graphic
Dear All
I want to plot a kind of figures, which can interactive with user.
For example, i have a matirx which can be showed by image function.
i.e. we can compare the value depend on different colors.
However, the change of colors depend on the range of value.
Nowaday, i want to set a bar, which can be moved by user such that the
user can obtain the appropriate range.
Does anyone suggest me which
2010 Nov 16
1
Question about GLMER
Dear R Help,
I believe the glmer() function in lme4 automatically fits an
unstrucruted covariance matirx for the random effects.
Is that true? If so, do I have an option to somehow ask for a
diagonal structured covariance matrix?
Thank you,
Daniel Jeske
Department of Statistics
University of California -Riverside
[[alternative HTML version deleted]]
2012 Jun 19
1
how to manipulate dput output format
I am reading into Java dput output for a matrix, more specifically for a
file backed big-matrix. I basically need to lift dimnames for a matrix from
dput output. It's no big deal, but the code is very 'hackish' due to the
need to get rid of quotes, endlines, parenthesis, etc. I was wondering if i
could manipulate to an extent dput output with some options that define it,
for example,
2011 Oct 13
5
Counting the number of integers at one swoop
Dear R users,
I'd like to count the number of integers in a vector y.
Here is an example.
y <- c(0,1,1,3,3,3,5,5,6)
In fact, I know how to count the number of specific number in y.
sum(y==0) -> 1
sum(y==1) -> 2
sum(y==2) -> 0
sum(y==3) -> 3
sum(y==4) -> 0
sum(y==5) -> 2
sum(y==6) -> 1
However, in one computation I want to get this vector [1,2,0,3,0,2,1].
Thank
2012 Jun 25
4
do.call or something instead of for
Dear R users,
I'd like to compute X like below.
X_{i,t} = 0.1*t + 2*X_{i,t-1} + W_{i,t}
where W_{i,t} are from Uniform(0,2) and X_{i,0} = 1+5*W_{i,0}
Of course, I can do this with "for" statement, but I don't think it's good
idea because "i" and "t" are too big.
So, my question is that
Is there any better idea to avoid "for" statement
2012 Jun 28
4
remove descriptions from output
Dear R users,
I'd like to remove some descriptions when I use "filter".
> filter(1:10, rep(1, 3))
Time Series:
Start = 1
End = 10
Frequency = 1
[1] NA 6 9 12 15 18 21 24 27 NA
That is, I want only this
[1] NA 6 9 12 15 18 21 24 27 NA
Thank you in advance.
Kathie
--
View this message in context:
2011 Aug 11
5
generate two sets of random numbers that are correlated
Dear R users
I'd like to generate two sets of random numbers with a fixed correlation
coefficient, say .4, using R.
Any suggestion will be greatly appreciated.
Regards,
Kathryn Lord
--
View this message in context: http://r.789695.n4.nabble.com/generate-two-sets-of-random-numbers-that-are-correlated-tp3735695p3735695.html
Sent from the R help mailing list archive at Nabble.com.
2013 Nov 01
2
computation of hessian matrix
below is a code to compute hessian matrix , which i need to generate 29 number of different matrices for example first element in x1 and x2 is use to generate let say matrix (M1) and second element in x1 and x2 give matrix (M2) upto matrix (M29) corresponding to the total number of observations and b1 and b2 are constant.
can some one guide me or help to implement this please. I did not
2008 Aug 04
2
thematic map of USA
My goal is to prepare a thematic map of the US, with states shaded
according to their values for a variable of interest. I would like to
include an inset for Alaska in the upper left and an inset for Hawaii in
the lower left. If possible, I'd like to use Albers conic projection, or
something similar. Thus far I have tried using the maps package with
its state database (which omits
2009 Jul 28
3
character vector -> numeric matrix ??
Dear R users...
I'd like to change this character vector, "zz",
zz <- c("12","56","89")
to the following numeric matrix.
[,1] [,2]
[1,] 1 2
[2,] 5 6
[3,] 8 9
Actually, "zz" vector has a long length.
Any comments will be greatly appreciated.
Kathryn Lord
--
View this message in context:
2008 Oct 08
3
Re move repeated values
Dear R users,
I'd like to make this data
rem.y = c(-1,0,2,4,5)
from
y = c(-1,-1,0,2,2,2,2,4,4,5,5,5,5,5).
That is, I need to remove repeated values.
Here is my code, but I don't think it is efficient. How could I improve
this?
#------------------------------------------------------------------------
y = c(-1,-1,0,2,2,2,2,4,4,5,5,5,5,5)
n=length(y)
for (i in 1:n) #
2008 Dec 26
2
about randomForest
hello,
I want to use randomForest to classify a matrix which is 331030?42,the last column is class signal.I use ?
Memebers.rf<-randomForest(class~.,data=Memebers,proximity=TRUE,mtry=6,ntree=200) which told me" the error is matrix(0,n,n) set too elements"
then I use:
Memebers.rf<-randomForest(class~.,data=Memebers,importance=TRUE,proximity=TRUE) which told me"the error is
2008 Mar 23
2
scaling problems in "optim"
Dear R users,
I am trying to figure out the control parameter in "optim," especially,
"fnscale" and "parscale."
In the R docu.,
------------------------------------------------------
fnscale
An overall scaling to be applied to the value of fn and gr during
optimization. If negative, turns the problem into a maximization problem.
Optimization is performed on
2011 Aug 13
3
optimization problems
Dear R users
I am trying to use OPTIMX(OPTIM) for nonlinear optimization.
There is no error in my code but the results are so weird (see below).
When I ran via OPTIM, the results are that
Initial values are that theta0 = 0.6 1.6 0.6 1.6 0.7. (In fact true vales
are 0.5,1.0,0.8,1.2, 0.6.)
--------------------------------------------------------------------------------------------
>
2008 Nov 17
2
re sults from "do.call" function
Dear R users...
I made this by help of one of R users.
_________________________________________________________________
X=matrix(seq(1,4), 2 , 2)
B=matrix(c(0.6,1.0,2.5,1.5) , 2 , 2)
func <- function(i,y0,j) { y0*exp(X[i,]%*%B[,j]) }
list1 <- expand.grid( i=c(1,2) , y0=c(1,2) , j=c(1,2) )
results <- do.call( func , list1 )
2007 Sep 29
2
Help with functions (iterations)
Hello:
I am a bit confused by this problem. Can anyone give me some advice on this I would greatly appreciate it. Thank you for all your help.
Need to create a for loop that saves the estimate of pi from each 0f 100 separate iterations and store it in a numeric vector (of length 100). The for loop should be placed in a function that allows the user to vary the sample size, the simulation size,