Creating a matrix subset in R -
i have big single row matrix (n=20000):
v1 col1 col2 col3 ... coln abc 1 3 5 2 i want subset keep columns value >= 3:
v1 col2 col3 abc 3 5 i have searched everywhere cannot come proper solution. suppose can transpose it, subset , transpose back?
appreciated.
logical indexing works on either i or j arguments "["
mtx[ , mtx > 3] # ............... read , study ?[ carefully. there power in function takes 10 readings gather of capacities , subtleties. (this may eve work on dataframe of appropriate construction , workings of "[" quite similar 2 structure=types.
Comments
Post a Comment