what is diffrence between NROW and nrow in r

0 votes
If nrow and ncol are already present in r, why are they still present? Do they differ from one another or are they merely aliases?

Matrix, mx (1:12,3,4)

nrow(mx)
NROW(mx)

ncol(mx) \sNCOL(mx)
Jun 23, 2022 in Data Analytics by avinash
• 1,840 points
2,184 views

1 answer to this question.

0 votes

5 In R, you may always check the code of a function by entering its name without the quotation marks. By doing this, you can observe how NCOL and ncol differ from one another:

NCOL

function # (x)

If length(d-dim(x)) > 1L, then d[2L] is used. else 1L

#

#

ncol

function # (x)

# dim(x)[2L]

#

#

While NCOL checks to see if the argument only has one dimension, in which case it returns 1, ncol always returns the second dimension of the argument.

Transform data into actionable insights with our Data Analyst Certification – Enroll today!

answered Jun 24, 2022 by Sohail
• 3,040 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

What is the difference between library () and require () functions in R ?

 library() require() Library () function gives an error message ...READ MORE

answered Sep 5, 2018 in Data Analytics by zombie
• 3,790 points
3,171 views
0 votes
2 answers

What is the difference between %% and % in R programming?

HI, %% returns remainder in case of numeric ...READ MORE

answered Aug 26, 2019 in Data Analytics by anonymous
• 33,050 points
3,014 views
0 votes
1 answer

What is the difference between list and vector in R?

The difference are - A list holds different ...