similar to: want to drop levels of table vector & join two vector(appending)

Displaying 20 results from an estimated 30000 matches similar to: "want to drop levels of table vector & join two vector(appending)"

2012 Feb 06
1
appending variable's values in table like fashion
i have two variable > pyar [1] "M" "12" "34" "13" > gita [1] "U" "22" "33" "44" want to append gita object below pyar object as & want to take in anther variable "M" "12" "34" "13" "U" "22" "33" "44" & write it in
2012 Feb 22
2
how to make hash?& append element, if i want following condition
i want hash like A : 1.2, 3.4, 4.5 B : 9.7, 5.6, 4.8 C : 3.4 ,5.7, 4.6 where A key contain all three value at right sight how to append single keys & values if i have predefined hash with known length -- View this message in context: http://r.789695.n4.nabble.com/how-to-make-hash-append-element-if-i-want-following-condition-tp4409761p4409761.html Sent from the R help mailing list
2012 Feb 05
2
how to avoid writing index in write.table command
how to avoid writing index of variable in write.table command, e.g. output---> index,character,state "1" "M" "2" "2" "K" "3" "3" "R" "1" "4" "E" "1" "5" "S" "1" "6" "H" "1" "7" "K" "1"
2012 Feb 28
2
how to append element at last position in array dynamically
> h<-array() > h [1] NA > append(h,9) [1] NA 9 but what it append......... > h [1] NA -- View this message in context: http://r.789695.n4.nabble.com/how-to-append-element-at-last-position-in-array-dynamically-tp4427893p4427893.html Sent from the R help mailing list archive at Nabble.com.
2012 Apr 28
6
problem in matching numbers in two variables
i want to compare two variables (having numbers) serially for matching/dismatching both having equal length > x [1] 2 2 1 2 3 2 2 2 2 3 3 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 3 2 3 2 2 2 1 2 2 [38] 2 2 2 3 2 3 2 2 1 2 2 2 2 1 1 1 3 2 2 2 2 1 1 3 1 1 1 2 2 2 3 2 3 3 3 2 2 [75] 2 2 3 2 2 1 1 1 2 3 2 2 2 2 2 2 2 2 2 1 1 3 2 2 2 2 2 2 2 2 2 2 2 1 3 > y [1] 2 2 2 1 3 1 3 2 1 3 3 3 3 2 2 1 2 3
2012 Feb 18
4
assigning NULL to a list element
Hi everyone, For reasons beyond the scope of this message, I'd like to append a NULL element to the end of a list. tmp0 <- list(a=1, b=NULL, c=3) append(tmp0, c(d=4)) ## works as expected append(tmp0, c(d=NULL)) ## list with a/b/c only Given that I could use tmp0$a <- NULL to remove 'a', I seem to understand why appending NULL returns me the original list... But how should I
2011 Apr 14
2
appending to a vector
Which one is more efficient? x2=c() for (i in 1:length(x)) { x2=c(x2,func(x[i])) } or x2=x for (i in 1:length(x)) { x2=func(x[i]) } where func is any function? Dirk -- View this message in context: http://r.789695.n4.nabble.com/appending-to-a-vector-tp3449109p3449109.html Sent from the R help mailing list archive at Nabble.com.
2012 Apr 25
1
Create a new Vector based on two columns
Hello, I am trying to get a new vector 'x1' based on the not NA-values in column 'a' and 'b'. I found a way but I am sure this is not the best solution. So any ideas on how to "optimize" this would be great! m <- factor(c("a1", "a1", "a2", "b1", "b2", "b3", "d1", "d1"), ordered
2009 Sep 09
1
R code for creating and appending to frequency table
Apologies for what might seem like an simple question. I have written a model which gives me a frequency distribution for a particular score within a set. What I now want to do is loop this so that I get many different frequency distributions and append them to a table with a collum which specifies which loop the frequency distribution is from. What I wantto end up with would look something like
2011 Apr 06
1
Creating a symmetric contingency table from two vectors with different length of levels in R
Hello, How can I create a symmetric contingency table from two categorical vectors having different length of levels? For example one vector has 98 levels TotalData1$Taxa.1 [1] "Aconoidasida" "Actinobacteria (class)" "Actinopterygii" "Alphaproteobacteria" [5] "Amoebozoa"
2009 May 23
2
as.numeric(levels(factor(x))) may be a decreasing sequence
Function factor() in the current development version (2009-05-22) guarantees that levels are different character strings. However, they may represent the same decimal number. The following example is derived from a posting by Stavros Macrakis in thread "Match .3 in a sequence" in March nums <- 0.3 + 2e-16 * c(-2,-1,1,2) f <- factor(nums) levels(f) # [1]
2006 Feb 21
1
Appending new tr into a table
Hi, While working on a project, I ran into the problem of appending <tr>''s to a table in IE 6. I am using new Insertion.Bottom(element, content); for this. This works fine in Firefox but in IE 6, I don''t get an error but nothing appears in the table. I know that IE treats innerHTML of a table as read only, but going through the following post, I assume there is some fix
2012 Mar 31
2
Is it there any std pattern in R which show same representation style of ppt found on net
i m searching on net,material related to R, whenever i get ppt presentation of some topic ,i found it in speical format white backgroud & blue bars,having links for further topics see link 1) https://www.rmetrics.org/files/Meielisalp2007/Presentations/Pfaff.pdf 2)http://grapevine.com.au/~yanchang/docs/Time-Series-Mining-slides.pdf If this is format,how can i made it,if i want to give my R
2012 May 26
6
how to check given number seq. is time series or not?
i have following numbers 0.889046409368551 1.22726162946495 1.22726162946495 1.35785109728356 1.35785109728356 1.10704609982913 1.4424189950435 1.2277843378837 1.35785109728356 0.970883941918588 0.822170913920467 1.35785109728356 0.358815782262543 0.774234247460432 0.822170913920467 0.822170913920467 0.72599976881814 0.671583894425946
2011 Apr 22
2
Matching a vector with a matrix row
Hello I am trying to compare a vector with a Matrix's rows.The vector has the same length as the number of columns of the matrix, and I would like to find the row numbers where the matrix's row us the same as the given vector. What I am doing at the moment is using apply as follows: apply(Matrix,1,function(x)all(x%in%LHS)) but this isn't too fast actually. I would like to know if
2012 Mar 07
2
how to see inbuilt function(cor.test) & how to get p-value from t-value(test of significance) ?
i can see source code of function > cor function (x, y = NULL, use = "everything", method = c("pearson", "kendall", "spearman")) { na.method <- pmatch(use, c("all.obs", "complete.obs", "pairwise.complete.obs", "everything", "na.or.complete"))
2011 Jan 05
4
Match numeric vector against rows in a matrix?
Two posts in one day is not a good day...and this question seems like it should have an obvious answer: I have a matrix where rows are unique combinations of 1's and 0's: > combs=as.matrix(expand.grid(c(0,1),c(0,1))) > combs Var1 Var2 [1,] 0 0 [2,] 1 0 [3,] 0 1 [4,] 1 1 I want a single function that will give the row index containing an exact match
2006 Feb 24
0
RE: Appending <tr>''s to Table - Images in <tr>''sloading slowly.
I have also experienced erratic image "non"-caching by IE in my projects (seemingly related specifically to AJAX/DOM manipulated nodes as you are seeing)... I tried preloading the icon images in body onload in global variables, then using those global variables to access the images... no luck. ...I have no idea why IE sometimes has to download these images that it SHOULD have in its
2012 Apr 23
3
Newbie Question on making subsets for every element of a table column
Hello, very new to R, playing with tables, and I am trying to do x <- subset(data, columnlabel == x) for every element in my column that I could find by using table (data [,"columnlabel"]) I'd appreciate any useful help and I'm sorry if I didn't get the terminology perfect. Thanks. -- View this message in context:
2011 Jan 29
1
How to apply a two-place function to each combination of elements in two vectors of different lengths?
Dear expeRts, I somehow can't manage to do the following: Given two vectors x and y of lengths 3 and 2, respectively, I would like to apply a function to each combination of the entries of x and y and receive a 3-by-2 matrix containing the results. Now outer() seems to be the way to go, but outer() expands the vectors first, which leads to errors in my function. Here is the minimal example: