Displaying 2 results from an estimated 2 matches for "ay2".
Did you mean:
a2
2004 Aug 15
3
Stacking Vectors/Dataframes
...stacking/merging two dataframes in R? I want to
stack them piece-wise, not simply add one whole dataframe to the bottom of
the other. I want to create as follows:
x.frame:
aX1 bX1 cX1 ... zX1
aX2 bX2 cX2 ... zX2
... ... ... ... ...
aX99 bX99 cX99 ... zX99
y.frame:
aY1 bY1 cY1 ... zY1
aY2 bY2 cY2 ... zY2
... ... ... ... ...
aY99 bY99 cY99 ... zY99
new.frame:
aX1 bX1 cX1 ... zX1
aY1 bY1 cY1 ... zY1
aX2 bX2 cX2 ... zX2
aY2 bY2 cY2 ... tY2
... ... ... ... ...
aX99 bX99 cX99 ... tX99
aY99 bY99 cY99 ... tY99
I have tried to use a for loop (simply assigning and also...
2012 Apr 29
2
Count number of rows in a matrix with a character pattern
Hi,
I have a large data set that I input as a matrix, where I have 1:x rows
with names AX, then x+1: y rows named AY, etc. The idea is that I have to
count how many rows exactly I have with name AX and how many I have with
name AY (or find which row numbers have names AX). Is there any way in R to
count a number of rows with a name matching a required pattern?
Thanks in advance,
Katie
--