Answers for "count values in r column"

1

count number of rows in r

#count total rows in data frame
nrow(df)

#count total rows with no NA values in any column of data frame
nrow(na.omit(df))

#count total rows with no NA values in specific column of data frame 
nrow(df[!is.na(df$column_name),])
Posted by: Guest on April-05-2022
0

count number of columns in r

ncol(df)
Posted by: Guest on April-03-2021

Code answers related to "count values in r column"

Browse Popular Code Answers by Language