Displaying 2 results from an estimated 2 matches for "minmaxarray".
2012 Aug 01
1
Error message: $ operator is invalid for atomic vectors
...y, until half an hour ago.? Couldn't find any problems in the code. Still, I am getting error message.
myMatrix <- data.matrix(read.table(text="
Name??????????? Age
ANTONY??????? 27
IMRAN????????? 30
RAJ????????????????? 22
NAHAS????????? 32
GEO??????????????? 42
", header=TRUE))
MinMaxArray? <- data.frame(MIN = 25,MAX=35)
myMatrix[myMatrix$Age<=MinMaxArray$MAX & myMatrix$Age>=MinMaxArray$MIN,]
#Error in myMatrix$Age : $ operator is invalid for atomic vectors
#Then, I tried Rui's code;
?inx <- MinMaxArray[[ "MIN" ]] <= myMatrix[, "Age"] &...
2012 Jul 31
2
Remove a complete row as per the Range in a Matrix
Hi,
Here i have a Matrix
MyMatrix <-
Name Age
--------- -------
ANTONY 27
IMRAN 30
RAJ 22
NAHAS 32
GEO 42
and here i have an array with Minimum and Maximum values.
MinMaxArray <- data.frame(MIN = 25,MAX=35)
MIN MAX
------ --------
25 35
------------------------------------------------------
Now what is, i need to get a matrix by removing the rows which is NOT coming
the "Age"-column in between the MIN and MAX value. Is it possible to avoi...