search for: myindex

Displaying 18 results from an estimated 18 matches for "myindex".

Did you mean: miindex
2012 Dec 06
4
Assignment of values with different indexes
...ish this. The result would look like so: x[1,2,3,4,5,6,7,8,9,10] becomes y[2,4,6,8,10,12,14,16,18,20] The "newindex" would not necessarily be this sequence, but a sequence I have stored in a vector, so it could be all kinds of values. here is what happens: > x <- rnorm(10) > myindex <- seq(from = 1,to = 20, by = 2) > y <- numeric() > y[myindex] <- x > y [1] -0.03745988 NA -0.09078822 NA 0.92484413 NA 0.32057426 NA [9] 0.01536279 NA 0.02200198 NA 0.37535438 NA 1.46606535 NA [17] 1...
2013 Mar 14
2
Modifying a data frame based on a vector that contains column numbers
Hello! # I have a data frame: mydf<-data.frame(c1=rep(NA,5),c2=rep(NA,5),c3=rep(NA,5)) # I have an index whose length is always the same as nrow(mydf): myindex<-c(1,2,3,2,1) # I need c1 to have 1s in rows 1 and 5 (based on the information in myindex) # I need c2 to have 1s in rows 2 and 4 (also based on myindex) # I need c3 to have 1 in row 3 # In other words, I am trying to achieve this result: mygoal<-data.frame(c1=c(1,NA,NA,NA,1),c2=c(NA,1,NA,1,...
2008 Dec 20
1
How to do indexing after splitting my data-frame?
...01 216.34.181.101 65.55.210.182 [25] 65.55.210.182 38.99.44.101 217.212.224.183 217.212.224.186 [29] 89.111.176.102 89.111.176.102 66.249.71.141 65.55.210.180 [33] 65.55.210.180 65.55.210.179 65.55.210.179 77 Levels: 124.0.210.117 145.253.3.244 160.91.44.155 ... 94.23.3.220 > > myindex <- "01-Dec-2008" > > weblog_by_date$myindex$host NULL > weblog_by_date[myindex]$host NULL > ======================================= How can I grab into the data-structures, using the indexing by date-string and by the names like "host" and so on? So: is it posi...
2003 Jun 09
1
estimate the number of clusters
Dear All, I am using Silhouette to estimate the number of clusters in a microarray dataset. Initially, I used the iris data to test my piece of code as follows: library(cluster) data(iris) mydata<-iris[,1:4] maxk<-15 # at most 15 clusters myindex<-rep(0,maxk) # hold the si values for each k clusters mdist<-1-cor(t(mydata)) #dissimlarity mdist<-as.dist(mdist) for(k in 2:maxk) { hc<-diana(mdist,diss =TRUE, stand = FALSE) si<-silhouette.default(cutree(as.hclust(hc),k=k),mdist) myindex<-summary(si)$avg.width } my...
2010 Oct 25
2
Find index of a string inside a string?
Hi, I am searching for the equivalent of the function Index from SAS. In SAS: index("abcd", "bcd") will return 2 because bcd is located in the 2nd cell of the abcd string. The equivalent in R should do this: > myIndex <- foo("abcd", "bcd") #return 2. What is the function that I am looking for? I want to use the return value in substr, like I do in SAS. thanks, y. baranan. [[alternative HTML version deleted]]
2012 Oct 08
3
turn list into dataframe
Dear R users, I'm starting to use 'apply' functions rather than for loops in R, and sometimes the output is a bit different than what I want. In this case, the command was tapply(myvector,myindex,cumsum) And the output was something like this: $`SNRL1 Core 120` [1] 2.8546 4.0778 5.2983 6.3863 7.5141 8.5498 9.5839 10.6933 $`SNRL1 Core 230` [1] 7.6810 8.7648 9.8382 10.8903 11.9840 13.0541 14.1132 15.1657 $`VAL 1.1.NA.na30` [1] 22.0840 30.3001 35.2505 42.8085 48.5220 52.0604 57....
2005 May 17
2
how to use list index to get vector
I have a simple question, but I couldn't find the answer in R manuals. Assume I have a list: > foo <- list() > foo[[1]] <- c(1, 2, 3) > foo[[2]] <- c(11,22,33) > foo[[3]] <- c(111,222,333) > foo [[1]] [1] 1 2 3 [[2]] [1] 11 22 33 [[3]] [1] 111 222 333 How to use list index to get a vector of, say, the first elements of list elements? That is, how to get a vector
2007 Apr 28
6
Determine how many documents a term occurs in
Is there a fast way to determine how many documents a term occurs in, besides iterating through every document with TermDocEnum? -- Best regards, Stian Gryt?yr
2011 Jan 21
3
How to find data that includes certain values
I am trying to return an index for a data set by searching using filenames. The name may be ANG_AUT.N.0734C70411A-1_1sA_0734C70411A.fasta, but i'd just like to search it using the term "0734C70411" as the file may be 0734C70411A or 0734C70411C or 0734C70411D Any way to do this other than doing something like this. where 0734C70411A is part of matrix list[,8]
2006 Sep 05
4
No matches
The following script creates a search index and then searches it. I get no results? Where am I going wrong? Thanks. -----------BEGIN SCRIPT---------------- require ''rubygems'' require ''ferret'' include Ferret path = ''/tmp/myindex'' field_infos = Ferret::Index::FieldInfos.new() field_infos.add_field(:name, :store => :yes, :index => :yes) field_infos.create_index(path) index = Index::Index.new(:path => path, :field_infos => field_infos, :analyzer => Analysis::AsciiStandardAnalyzer.new) index <<...
2006 May 12
2
Benchmark - Thanks Dave for making this gnawer this FAST!!
Hi List, I''ve took some time and made some tests on the performance of java-lucene, hyperestraier and ferret as Dave encourages the community of ferret to do so. Quite intersting numbers. Ferret indeed deserves to be called a high-performance port!! It''s MyFirstBenchmark ( http://ferret.davebalmain.com/trac/wiki/MyFirstBenchmark ) so please don''t be too cruel on
2002 Mar 21
5
repeating rows or columns within a matrix
Hello Spse I have a matrix, say 1 2 3 4 5 6 7 8 9 and I would like to expand it by repeating rows within the matrix, to get, if the repeating factor is 2, say: 123 123 456 456 789 789 (or columnwise as well) . There must be a smart way of doing that? Many thanks Juhana Vartiainen juhana.vartiainen at labour.fi -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2007 Aug 16
1
time series with quality codes
list(...), I am working with environmental time series (eg rainfall, stream flow) that have attached quality codes for each data point. The quality codes have just a few factor levels, like "good", "suspect", "poor", "imputed". I use the quality codes in plots and summaries. They are carried through when a time series is aggregated to a longer time-step,
2007 May 10
5
Segmentation fault on large index
...ound? --------------------- after optimizing the index ----------------------- $ irb irb(main):001:0> require ''rubygems'' => true irb(main):002:0> require ''ferret'' => true irb(main):003:0> index = Ferret::Index::Index.new(:path => "/tmp/myindex") => #<Ferret::Index::Index:0xb7b23330 @writer=nil, @mon_entering_queue=[], @default_input_field=:id, @mon_count=0, @qp=nil, @default_field=:*, @options={:dir=>#<Ferret::Store::FSDirectory:0xb7b23308>, :path=>"/tmp/myindex", :lock_retry_time=>2, :analyzer=>#&l...
2017 Dec 06
0
[Gluster-devel] Crash in glusterd!!!
...ta = {ptr = 0x700000001, fd = 7, u32 = 7, u64 = 30064771073}} ret = <optimized out> ev_data = 0x100bb4a0 <main_thread_func__()+1756> event_pool = 0x10045bc0 <_GLOBAL__sub_I__ZN29DrhIfRhControlPdrProxyC_ActorC2EP12RTControllerP10RTActorRef()+116> myindex = <optimized out> timetodie = 0 __FUNCTION__ = "event_dispatch_epoll_worker" #17 0x00003fff884cfb10 in start_thread (arg=0x3fff83d9e160) at pthread_create.c:339 pd = 0x3fff83d9e160 now = <optimized out> unwind_buf = {cancel_jmp_buf...
2017 Dec 06
1
[Gluster-devel] Crash in glusterd!!!
...u64 = 30064771073}} > > ret = <optimized out> > > ev_data = 0x100bb4a0 <main_thread_func__()+1756> > > event_pool = 0x10045bc0 <_GLOBAL__sub_I__ > ZN29DrhIfRhControlPdrProxyC_ActorC2EP12RTControllerP10RTActorRef()+116> > > myindex = <optimized out> > > timetodie = 0 > > __FUNCTION__ = "event_dispatch_epoll_worker" > > #17 0x00003fff884cfb10 in start_thread (arg=0x3fff83d9e160) at > pthread_create.c:339 > > pd = 0x3fff83d9e160 > > now = <optim...
2017 Dec 06
2
[Gluster-devel] Crash in glusterd!!!
Without the glusterd log file and the core file or the backtrace I can't comment anything. On Wed, Dec 6, 2017 at 3:09 PM, ABHISHEK PALIWAL <abhishpaliwal at gmail.com> wrote: > Any suggestion.... > > On Dec 6, 2017 11:51, "ABHISHEK PALIWAL" <abhishpaliwal at gmail.com> wrote: > >> Hi Team, >> >> We are getting the crash in glusterd after
2011 Jan 22
0
how to call BayesX in R to see the graph
...42-desktop> Content-Type: text/plain; charset="UTF-8" Hello Consider following dataframe named df var1 var2 var3 3771 354 565 654654 963 6677 775 147 657754 df <- read.table('clipboard', header = TRUE) df #find indexes with '77' in var 1 myIndexes <- grep( glob2rx("*77*"), df$var1) myIndexes #find actual values of seach above myValu <- grep( glob2rx("*77*"), df$var1, value=TRUE) myValu #find all '77' in entire dataframe all77 <- lapply(df, function(x)grep( glob2rx("*77*"), x, value=TRUE)) all7...