Thanks.
sort(unique(Data[[1]]))
This syntax provides row numbers, not column values.
*Stephen Dawson, DSL*
/Executive Strategy Consultant/
Business & Technology
+1 (865) 804-3454
http://www.shdawson.com <http://www.shdawson.com>
On 12/20/21 11:58 AM, Stephen H. Dawson, DSL via R-help wrote:
Hi,
Running a simple syntax set to review entries in dataframe columns.
Here is the working code.
Data <- read.csv("./input/Source.csv", header=T)
describe(Data)
summary(Data)
unique(Data[1])
unique(Data[2])
unique(Data[3])
unique(Data[4])
I would like to add sort the unique entries. The data in the various
columns are not defined as numbers, but also text. I realize 1 and 10
will not sort properly, as the column is not defined as a number, but
want to see what I have in the columns viewed as sorted.
QUESTION
What is the best process to sort unique output, please?
Thanks.
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.