tapply() Function in R (R Tutorial 1.15)

Learn how to use the “tapply()” function in R, to apply a function to subsets of a variable or vector. The tapply function essentially is a specialized loop/subsetting function, although it is more efficient than a simple use of sure brackets or a “subset” command. The tapply function allows the user to divide a variable into multiple groups based on another variable(s) used to define the groups/subses, and then apply a function to each of the groups/subsets.

This video is a tutorial for programming in R Statistical Software for Statistics and Data Science beginners, using RStudio.

You can access the dataset and R script (tApply Function) here:

Visit www.statslectures.com for more videos and tutorials on R



Could u make a video on How to make a heat map or density map in rstudio using ggmap or leaflet package.

Angel Ang says:

Thanks for your videos and work. Waiting another one with probability 1.

Shreya soni says:

What if we want to find the mean Age of Female Smokers ? What command do we run ?

Avishek Chakraborty says:

Error in tapply….object ‘Smoke’ not found…cud u help me out with this. Also have checked by replacing smoke with caesarean.It then gave ,object caesarean not found

katerina liu says:

clear and understandable tutoring

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles   Show Cars   Motorbikes   Scooters   Rims & Tires   Luxury BoatsFashion   Sunglasses   Luxury Watches   Luxury Purses   Jeans Wear   High Heels   Perfumes   Jewellery   Cosmetics   Shaving Helpers   Fashion HatsFooding   Chef Club   Fooding Helpers   Coktails & LiquorsSports   Sport Shoes   Fitness & Detox   Golf Gear   Racquets   Diving Equipment   Ski Gear   Snowboards   Surf Boards   Rollers & SkatesEntertainment   DIY Guides   Zik Instruments   Published Books   Music Albums   Cine Movies   Trading Helpers   Make Money   Fishing Equipment   Paintball Supplies   Trading Card Games   Telescopes   Knives   VapesHigh Tech   Flat Screens   Tech Devices   Camera Lenses   Printers   USB Devices   PC Hardware   Network Gear   Cloud Servers   Software Helpers   Programmer Helpers   Mobile Apps   Hearing AidsHome   Home Furniture   Home Appliances   Beddings   Floor Layings   Barbecues   Aquarium Gear   Safe Boxes   Office Supplies   Security Locks   Cleaning ProductsKids   Baby Strollers   Child Car Seats   Remote ControlledTravel   Luggages & Bags   Airlines Seats   Hotel Rooms   Fun Trips   Cruise Ships   Mexico Tours