length(df_school_all) actually represents the columns of data, which is the number of attributes. But nrow(df_school_all) represents the number of pieces of data. You can also use dim(df_school_all) to view data dimensions and quantities.
Result of length(df_school_all): [1] 55
Result of nrow(df_school_all): [1] 21301
Result of dim(df_school_all): [1] 21301 55
length(df_school_all)
actually represents the columns of data, which is the number of attributes. Butnrow(df_school_all)
represents the number of pieces of data. You can also usedim(df_school_all)
to view data dimensions and quantities. Result oflength(df_school_all)
: [1] 55 Result ofnrow(df_school_all)
: [1] 21301 Result ofdim(df_school_all)
: [1] 21301 55