Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to use sapply in r?



How to use sapply in r?..

Answer / Ashish Khare

sapply is a function from the base R package that applies a function to each element of an object (like a list or vector) and returns a simplified result. For example, sapply(c(1, 2, 3), function(x) x^2) will return a vector containing the squares of the numbers 1, 2, and 3.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More R Programming Interview Questions

What is the difference between rnorm and runif functions ?

1 Answers  


Explain what is t-tests in r?

1 Answers  


How would you create a new r6 class?

1 Answers  


How to create vectors in r?

1 Answers  


How would you find out the mean of one column with respect to another?

1 Answers  


Explain how to create a list in r?

1 Answers  


What is compiler in r?

1 Answers  


In r how missing values are represented?

1 Answers  


How would you do a left and right join in r?

1 Answers  


What is inheritance in s3 class?

1 Answers  


What is the table in r?

1 Answers  


What are the applications of R?

1 Answers  


Categories