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 apply() family in r?

1 Answers  


What are co-relations in R?

1 Answers  


What do you mean by data visualization in R?

1 Answers  


How you can start the r commander gui?

1 Answers  


Write a function in R language to replace the missing value in a vector with the mean of that vector?

1 Answers  


Explain advantages of density-based clustering in R?

1 Answers  


How will you merge two dataframes in r programming language?

1 Answers  


Vector v is c(1,2,3,4) and list x is list(5:8), what is the output of v*x[[1]]?

1 Answers  


Explain general format of matrices in r?

1 Answers  


Name the functions which helps in importing data from other applications in R?

1 Answers  


What are the features of r programming?

1 Answers  


What is the purpose of using Next statement in R language?

1 Answers  


Categories