Displaying 20 results from an estimated 10000 matches similar to: "index of min elements in matrix"
2011 Sep 09
3
get mean from cdf
Hi All,
How can I get the expected value from a discrete cdf? Is there any R
function that can do this?
Thanks,
Annie
[[alternative HTML version deleted]]
2009 Aug 08
1
generalized linear models
Hi, R users,
I am trying to use glm to do logistic regression. I know generally when I
have two covariates, say x1 and x2, then I do
fit <- glm(y~x1+x2,famliy='binomial')
But now my covariates form a n*p matrix, say x, so actually each column is a
covariate. So I think I should do
fit <- glm(y~x,family='binomial')
Then I need to predict new data. How should I write the
2011 Aug 11
2
2-dim density plot
Hi All,
I have a 2-dim density defined on 0<x<1, 0<y<1, x<y. I know the exact
formula of the density. How can I visualize it? What plot functions can I
use?
Thanks,
Annie
[[alternative HTML version deleted]]
2012 Jun 19
2
how to use by function
hi all,
Assume I have data like
data<-rbind(c(1,2),c(1,3),c(2,1),c(3,2),c(3,4))
I want to get some matrix like
1,2,3
2,NA,NA
3,2,4
I'm using by
mat<-matrix(NA,3,3)
by(data,data[,1],mat[data[,1],]<-c(data[,2]))
but it doesn't work.
Any ideas?
thanks,
cowboy
2008 Feb 13
3
indices of rows containing one or more elements >0
Hi,
Given test <- matrix(c(0,2,0,1,3,5), 3,2)
> test[test>0]
[1] 2 1 3 5
These are values >0
> which(test>0)
[1] 2 4 5 6
These are array indices of those values >0
> which(apply(test>0, 1, all))
[1] 2
This gives the row whose elements are all >0
I can't seem to get indices of rows containing one or more elements >0
[[alternative HTML version deleted]]
2012 Aug 17
5
specific matrix element tranformation
Hi guys,
I am trying to write a function that allows me to perform specific
transformations to each element of
a 2 by 2 matrix to generate a 3 by 3 matrix.
Input into function-2 by 2 matrix
Output from function -3 by 3 matrix
For example:
# a is my original 2 by 2 matrix
#b is my new 3 by 3 matrix
set.seed(2)
a=matrix(rnorm(4),ncol=2)
#let's say these are the transformations i wish to
2012 Mar 30
2
Finding the maximum elements in an array/matrix
Hello,
I would like to find the maximum element in a matrix or an array but it
does not return what I want.
For example, If I have a 2*2 matrix A whose maximum element is the
A(1,2). I would like the answer (1,2), but it returns 3, which is the
ordinal if one counts by columns. Is there any function that returns (1,2)?
Thanks
> A<-rbind(c(1,4), c(3,2))> A [,1] [,2]
[1,]
2007 May 04
2
sporadic slow/non response, problems copying to sent folder
After experiencing these symptoms through many of the release
candidates, we've been at v1.0.0 now for a few weeks, and they're still
there. Perhaps a config issue with my setup (mbox locks?). It's really
too disrupting to continue using this way. I've included symptoms,
client info, mta info, log entries and config file. What other
information can I provide? Please
2018 Dec 14
1
ask some questions about opus
Dear Sir,
Very glad to send E-mali to you , Im Annie.
I have encountered some problems on the way of learning opus, so I would like to consult you. I found "global_stack" was not released after malloc, and malloc memory was too large.So what I want to ask you is whether "global_stack" malloc can have less memory, since the value "GLOBAL_STACK_SIZE" can be
2012 Apr 09
1
Pairwise comparison matrix elements
Hi!,
I'm really hoping someone out there will be able to help me.
I recently started my MSc dissertation on Population Projection Matrices, which has been going well until now. I am trying to set-up a general script that does a pairwise comparison of all elements in my matrices.
So for example, given that I have the following matrix S:
> S
[,1] [,2] [,3]
[1,]
2013 Jul 10
13
[PATCH v2 1/1] xen/netback: correctly calculate required slots of skb.
When counting required slots for skb, netback directly uses DIV_ROUND_UP to get
slots required by header data. This is wrong when offset in the page of header
data is not zero, and is also inconsistent with following calculation for
required slot in netbk_gop_skb.
In netbk_gop_skb, required slots are calculated based on offset and len in page
of header data. It is possible that required slots
2006 Mar 06
3
Problem Accessing Samba Server from Windows
Hi,
I'm having a problem accessing my samba server from Windows. The problem
occurs every time I try to browse to it on either XP or 2003 Server. The
error message I get is: "\\Zeus is not accessible. You might not have
permission to use this network resource. Contact the administrator of
this server to find out if you have access permissions. The account is
not authorized to log in
2009 Sep 03
2
variable selection in logistic
Hi, R users,
What may be the best function in R to do variable selection in logistic
regression? I have the same number of variables as the number of samples,
and I want to select the best variablesfor prediction. Is there any function
doing forward selection followed by backward elimination in stepwise
logistic regression?
Thanks,
Annie
[[alternative HTML version deleted]]
2009 Jan 20
2
iperf problem with Windows SMP VM
Hi
I am developing Window pv network driver and hit a problem now.
My server use Xen 3.1.4 and have 2 physical CPUs. When I create two VM
with 1 VCPU on a same server, iperf performance is OK between those two
VM, but there is performance degradation between those 2 VM when i
increase VCPU from 1 to 2.
This problem occurs in QEMU mode too.
Does Xen 3.1.4 has such problem or anything wrong
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?
2012 Mar 20
1
Problem in loop
Dear R users
I want change the entries in a matrix. I did a matrix
A=0 1 5
.3 0 0
0 .5 0
A1<-A
A2<-A*0.90
A2
1 2 3
1 0.00 0.90 4.5
2 0.27 0.00 0.0
3 0.00 0.45 0.0
I need replace elements one by one in a loop
I tried the following using package POPBIO,
total <-matrix(0, nrow=5, ncol=60)
for(i in 1:10){
A1<-A
A1[1,2] <- A2[1,2]
2009 Aug 03
1
penalized logistic regression
Hi, R users,
Is there any package for penalized logistic regression with more than two
response classes? I read the manual for stepPlr, but it seems it's only for
binary case.
Thank you,
Annie
[[alternative HTML version deleted]]
2009 Dec 12
1
matched pair proportion test
Hi, ALL,
Is there any function in R that does the exact test for the matched pair
proportions (one sided), which I assume is binomial(b+c, .5).
Thanks,
Annie
[[alternative HTML version deleted]]
2012 Feb 20
10
[PATCH] hvm: Correct RTC time offset update error due to tm->tm_year
Hi
In rtc_set_time, mktime is called to calculate seconds since 1970/01/01,
input parameters of mktime are required to be in normal date format.
Such as: year=1980, mon=12, day=31, hour=23, min=59, sec=59. However,
the current input parameter of mktime is tm->tm_year, and it is the
number of years since 1900. (For example, if current time is 2012/12/31,
and tm->tm_year is 112). This is
2011 May 26
2
summing array elements
Hi to everybody
I have an array with dimensions 2,4,3,3.
Wanting to sum the matrices in the first two dimensions, I'm trying to use
the "apply" function, but with no results. Have to say I'm quite new with R
syntax.
tx in advance
marco
[[alternative HTML version deleted]]