Displaying 5 results from an estimated 5 matches for "na_count".
2017 Oct 29
7
Count non-zero values in excluding NA Values
Dear R Staff
You can see my data.csv file in the annex.
I try to count non-zero values in dataset but I need to exclude NA in this
calculation
My code is very long (following),
How can I write this code more efficiently and shortly?
## [NA_Count] - Find NA values
data.na =sapply(data[,3:ncol(data)], function(c) sum(length(which(is.na
(c)))))
## [Zero] - Find zero values
data.z=apply(data[,3:ncol(data)], 2, function(c) sum(c==0))
## [Non-Zero] - Find non-zero values
data.nz=nrow(data[,3:ncol(data)])- (data.na+data.z)
Sincerely
Engi...
2017 Oct 29
0
Count non-zero values in excluding NA Values
...wrote:
> Dear R Staff
>
> You can see my data.csv file in the annex.
>
> I try to count non-zero values in dataset but I need to exclude NA in this
> calculation
>
> My code is very long (following),
> How can I write this code more efficiently and shortly?
>
> ## [NA_Count] - Find NA values
>
> data.na =sapply(data[,3:ncol(data)], function(c) sum(length(which(is.na
> (c)))))
>
>
> ## [Zero] - Find zero values
>
> data.z=apply(data[,3:ncol(data)], 2, function(c) sum(c==0))
>
>
> ## [Non-Zero] - Find non-zero values
>
> data.nz=nr...
2017 Oct 29
0
Count non-zero values in excluding NA Values
...wrote:
> Dear R Staff
>
> You can see my data.csv file in the annex.
>
> I try to count non-zero values in dataset but I need to exclude NA in this
> calculation
>
> My code is very long (following),
> How can I write this code more efficiently and shortly?
>
> ## [NA_Count] - Find NA values
>
> data.na =sapply(data[,3:ncol(data)], function(c) sum(length(which(is.na
> (c)))))
>
>
> ## [Zero] - Find zero values
>
> data.z=apply(data[,3:ncol(data)], 2, function(c) sum(c==0))
>
>
> ## [Non-Zero] - Find non-zero values
>
> data.nz=nr...
2017 Oct 29
0
Count non-zero values in excluding NA Values
...creveu:
> Dear R Staff
>
> You can see my data.csv file in the annex.
>
> I try to count non-zero values in dataset but I need to exclude NA in this
> calculation
>
> My code is very long (following),
> How can I write this code more efficiently and shortly?
>
> ## [NA_Count] - Find NA values
>
> data.na =sapply(data[,3:ncol(data)], function(c) sum(length(which(is.na
> (c)))))
>
>
> ## [Zero] - Find zero values
>
> data.z=apply(data[,3:ncol(data)], 2, function(c) sum(c==0))
>
>
> ## [Non-Zero] - Find non-zero values
>
> data.nz=nr...
2017 Oct 29
1
Count non-zero values in excluding NA Values
...gt; You can see my data.csv file in the annex.
>>
>> I try to count non-zero values in dataset but I need to exclude NA in this
>> calculation
>>
>> My code is very long (following),
>> How can I write this code more efficiently and shortly?
>>
>> ## [NA_Count] - Find NA values
>>
>> data.na =sapply(data[,3:ncol(data)], function(c) sum(length(which(is.na
>> (c)))))
>>
>>
>> ## [Zero] - Find zero values
>>
>> data.z=apply(data[,3:ncol(data)], 2, function(c) sum(c==0))
>>
>>
>> ## [Non-Zero]...