similar to: Assignment of values with different indexes

Displaying 14 results from an estimated 14 matches similar to: "Assignment of values with different indexes"

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
2008 Dec 20
1
How to do indexing after splitting my data-frame?
Hello, after splitting a data-frame I want to access the results. Maybe the problem is, that the factor/index is a string... ...or do I miss knowing details of the index-uasge? Please look and help: ======================================= > weblog <- read_weblog("web.log") > > > str(weblog) 'data.frame': 2247 obs. of 18 variables: $ host : Factor w/ 77
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
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
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
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 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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)
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,
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
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
2017 Dec 06
0
[Gluster-devel] Crash in glusterd!!!
Hi Atin, Please find the backtrace and logs files attached here. Also, below are the BT from core. (gdb) bt #0 0x00003fff8834b898 in __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:55 #1 0x00003fff88350fd0 in __GI_abort () at abort.c:89 [**ALERT: The abort() might not be exactly invoked from the following function line. If the trail function
2017 Dec 06
1
[Gluster-devel] Crash in glusterd!!!
I hope these logs were sufficient... please let me know if you require more logs. On Wed, Dec 6, 2017 at 3:26 PM, ABHISHEK PALIWAL <abhishpaliwal at gmail.com> wrote: > Hi Atin, > > Please find the backtrace and logs files attached here. > > Also, below are the BT from core. > > (gdb) bt > > #0 0x00003fff8834b898 in __GI_raise (sig=<optimized out>) at >
2007 May 10
5
Segmentation fault on large index
I''m getting a segmentation fault on a large index (15GB). I''m running ferret 0.11.4 on OpenSuSE 10.2 with ruby 1.8.6. The segmentation fault appeared after I optimized the index, see further below for the error message I got before that. Ferret works perfectly on other (smaller) indexes. Is this a known issue, and if so, is there a workaround? --------------------- after