Displaying 20 results from an estimated 4000 matches similar to: "Quickest way to match two vectors besides %in%?"
2010 Jun 24
1
Quickest way to retrieve data for a large match set?
We're using the Perl binding to access Xapian in a simple search of image
metadata (title and keywords). Due to the specification for the search engine,
by default we have to sort the results using a function of the search rank,
age (well, newness) and popularity (rated by sales of the image). As a result,
we have to fetch the complete result set and then calculate a new ranking
based on
2012 Aug 13
2
quickest way to stop VM
Hello
Which is the quickest way to stop KVM guest VM. I am not interested in
saving anything; I just have to make sure that VM apps are ended quickly.
i) virsh shutdown
ii) virsh suspend
iii) virsh destroy
>From little descriptions I have, looks like destroy is the fastest way and
acts like a removal of a power plug.
Pls let me know.
Thanks
>Harish
-------------- next part
2008 Apr 02
1
Quickest way to access data.frame?
Hi, I have tried search around this forum for the best way to access a
data.frame.. i got the feeling that "no partial match" is the way to make it
fast.... so I convert everything to factor.. but I'm still not 100% sure if
the following code will do it... is this the fastest way to do something
foreach (ID, ID2) pair? Thanks!
data <- data.frame(ID = floor(runif(n = 40000, min=0,
2011 Nov 12
1
Using require_relative to speed up rspec require time.
Hi,
I noticed recently that require ''rspec'' on my machine was taking close
to half a second. That''s not a huge amount of time, but it is still
the single slowest part of my test suite.
It boils down to Ruby 1.9''s rather slow require. I''m using 1.9.3, but
I''d still like to shave off some of the require time.
As an experiment, I went into
2007 Apr 24
5
intersect more than two sets
Hi,
I searched the archives and did not find a good solution to that.
assume I have 10 sets and I want to have the common character elements of them.
how could i do that?
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I believed..."
---Matrix III
2010 Feb 28
4
Reducing a matrix
I wish to rearrange the matrix, df, such that all there are not repeated x values. Particularly, for each value of x that is reated, the corresponded y value should fall under the appropriate column. For example, the x value 3 appears 4 times under the different columns of y, i.e. y1,y2,y3,y4. The output should be such that for the lone value of 3 selected for x, the corresponding row entries
2011 May 27
4
network package in R
Hi there,
I need a network builder and it can change the node size and color; I am not
sure if network package in R can do this or not. The other functions I
wanted have been found in that package.
BTW, if there is another package in R relating to this, please suggest too.
Thanks,
Weiwei
--
Weiwei Shi, Ph.D
Research Scientist
"Did you always know?"
"No, I did not. But I
2007 Apr 11
5
how to reverse a list
Hi, there:
I am wondering if there is a quick way to "reverse" a list like this:
t0 <- list(a=1, b=1, c=2, d=1)
reverst t0 to t1
> t1
$`1`
[1] "a" "b" "d"
$`2`
[1] "c"
thanks.
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I believed..."
---Matrix III
2004 Feb 26
2
Structural Equation Model
Hello all!
I want to estimate parameters in a MIMIC model. I have one latent
variable (ksi), four reflexive indicators (y1, y2, y3 and y4) and four
formative indicators (x1, x2, x3, x4). Is there a way to do it in R? I
know there is the SEM library, but it seems not to be possible to
specify formative indicators, that is, observed exogenous variables
which causes the latent variable.
Thanks,
2005 Jun 20
6
tapply
hi,
i have another question on tapply:
i have a dataset z like this:
5540 389100307391 2600
5541 389100307391 2600
5542 389100307391 2600
5543 389100307391 2600
5544 389100307391 2600
5546 381300302513 NA
5547 387000307470 NA
5548 387000307470 NA
5549 387000307470 NA
5550 387000307470 NA
5551 387000307470 NA
5552 387000307470
2008 Aug 13
1
summary.manova rank deficiency error + data
Dear R-users;
Previously I posted a question about the problem of rank deficiency in
summary.manova. As somebody suggested, I'm attaching a small part of
the data set.
#***************************************************
"test" <-
structure(.Data = list(structure(.Data = c(rep(1,3),rep(2,18),rep(3,10)),
levels = c("1", "2", "3"),
class =
2008 Dec 29
4
Merge or combine data frames with missing columns
Hi R-experts,
suppose I have a list with containing data frame elements:
[[1]]
(Intercept) y1 y2 y3 y4
-6.64 0.761 0.383 0.775 0.163
[[2]]
(Intercept) y2 y3
-3.858 0.854 0.834
Now I want to put them into ONE dataframe like this:
(Intercept) y1
2007 Jun 25
3
a string to enviroment or function
Hi,
I am wondering how to make a function Fun to make the following work:
t0 <- (paste("hgu133a", "ENTREZID", sep=""))
xx <- as.list(Fun(t0)) # make it work like xx<-as.list(hgu133aENTREZID)
thanks,
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I believed..."
---Matrix III
2005 Aug 12
2
need help
Hi, there:
I think i need to re-phrase my question since last time I did not get
any reply but i think the question is not that hard, probably i did
not make the question clear:
I want to find cases like
35, 90, 330, 330, 335
from the rest which look like
3, 3, 3, 3.2, 3.3
4, 4.4, 4.5, 4.6, 4.7
....
basically there is one (or more) big 'gap' in the case i seek.
thanks,
weiwei
--
2007 Jan 24
3
Cronbach's alpha
Dear Listers:
I used cronbach{psy} to evaluate the internal consistency and some set
of variables gave me alpha=-1.1003, while other, alpha=-0.2;
alpha=0.89; and so on. I am interested in knowing how to interpret
1. negative value
2. negative value less than -1.
I also want to re-mention my previous question about how to evaluate
the consistency of a set of variables and about the total
2006 Oct 17
4
cluster in R
hi,
is there some good summary on clustering methods in R? It seems there
are many packages involving it.
And I have two questions on clustering here:
1. Is there a way of evaluate the effecitives (or seperation) of
clustering (rather than by visualization)?
2. Is there a search method (like genetic search) which can help find
the best subset of attributes which gives best seperation?
Thanks,
2006 Apr 07
2
a statistics question
Hi there,
I have a statistics question on a classification problem:
Suppose I have 1000 binary variables and one binary dependent variable. I
want to find a way similar to PCA, in which I can find a couple of
combinations of those variables to discriminate best according to the
dependent variable. It is not only for dimension reduction, but more
important, for finding best way to construct
2005 Jul 13
1
read.table
Hi,
I have a question on read.table.
I have a dataset with 273,000 lines and 195 columns. I used the
read.table to load the data into R:
trn<-read.table('train1.dat', header=F, sep='|', na.strings='.')
I found it takes forever.
then I run 1/10 of the data (test) using read.table again. And this
time it finished quickly. So, there might be something wrong in my
data
2011 Aug 15
1
update() ignores object
Hi all,
I'm extracting the name of the term in a regression model that
dropterm specifies as the least significant one, and I'm assigning
this name to an object. However, when I use update(), it ignores this
object. Is there a way I can make it not ignore it? A reproducible
example is below:
> lm(x1~1+y1*y2+y3+y4,data=anscombe)->my.lm
>
2005 Jul 07
2
randomForest
> From: Weiwei Shi
>
> it works.
> thanks,
>
> but: (just curious)
> why i tried previously and i got
>
> > is.vector(sample.size)
> [1] TRUE
Because a list is also a vector:
> a <- c(list(1), list(2))
> a
[[1]]
[1] 1
[[2]]
[1] 2
> is.vector(a)
[1] TRUE
> is.numeric(a)
[1] FALSE
Actually, the way I initialize a list of known length is by