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
1,188 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
2,667 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,030 points
2,443 views
0 votes
1 answer

What is the difference between list and vector in R?

The difference are - A list holds different ...READ MORE

answered Oct 29, 2019 in Data Analytics by Cherukuri
• 33,030 points
48,230 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,570 points
1,048 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
1,226 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
5,912 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,660 points
1,158 views
0 votes
1 answer

Use of $ and %% operators in R

According to help('percent in percent'), percent in ...READ MORE

answered Jun 23, 2022 in Data Analytics by Sohail
• 3,040 points
774 views
0 votes
1 answer

Why variance in R is different? [duplicate]

There are usually two methods for calculating ...READ MORE

answered Jun 14, 2022 in Data Analytics by Sohail
• 3,040 points
616 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP