Answers for "get number of columns in dataframe r"

R
1

how to get number of columns in matrix R

#Suppose x is a matrix
x <- matrix()

#Number of rows
nrow(x)
#Number of columns
ncol(x)
Posted by: Guest on November-11-2020
0

count number of columns in r

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

Code answers related to "get number of columns in dataframe r"

Browse Popular Code Answers by Language