Re: [R] counting unique values (summary stats)

2019-03-22 Thread David L Carlson
emius Sent: Thursday, March 21, 2019 5:55 PM To: reichm...@sbcglobal.net; 'r-help mailing list' Subject: Re: [R] counting unique values (summary stats) On 3/21/19 3:31 PM, reichm...@sbcglobal.net wrote: > r-help > > I have the following little scrip to create a df of summary stats. I&

Re: [R] counting unique values (summary stats)

2019-03-21 Thread David Winsemius
On 3/21/19 3:31 PM, reichm...@sbcglobal.net wrote: r-help I have the following little scrip to create a df of summary stats. I'm having problems obtaining the # of unique values unique=sapply(myData, function (x) length(unique(x), replace = TRUE)) I just looked up

[R] counting unique values (summary stats)

2019-03-21 Thread reichmanj
r-help I have the following little scrip to create a df of summary stats. I'm having problems obtaining the # of unique values unique=sapply(myData, function (x) length(unique(x), replace = TRUE)) Can I do that, or am I using the wrong R function? summary.stats <- data