Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
R Data Structures and Algorithms

You're reading from   R Data Structures and Algorithms Increase speed and performance of your applications with effi cient data structures and algorithms

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781786465153
Length 276 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Achyutuni Sri Krishna Rao Achyutuni Sri Krishna Rao
Author Profile Icon Achyutuni Sri Krishna Rao
Achyutuni Sri Krishna Rao
PKS Prakash PKS Prakash
Author Profile Icon PKS Prakash
PKS Prakash
Arrow right icon
View More author details
Toc

Exercises

  1. The following are some growth-rate functional forms. Can you arrange them in the order of slower to faster performance?
    • 10n3
    • 3(log e n)2
    • 10n
    • 100n
    • Log2n2
    • Log2n3
    • Log3n2
    • Log3n3
    • n1.5
  2. Answer the following questions:
    • How can we evaluate the total memory currently being used by a given R environment? What is the purpose of garbage collection (GC) in the context of R?
    • Which occupies more size-a matrix with 10 numbers of categorical attributes, or a dataframe with 10 numbers of corresponding factors?
    • Can you evaluate and plot the memory allocation for dataframes and matrices with an increment of five observations for a fixed number of attributes (15 columns)?
    • Why does data.table occupy more memory than data.frame?
  3. Is data.table scalable in terms of performance (faster execution of operations) related to data pre-processing and transformations?

    (Hint: microbenchmark using large number of variables and observations with a higher number of iterations for each scenario).

  4. What are the best, worst, and average...
You have been reading a chapter from
R Data Structures and Algorithms
Published in: Nov 2016
Publisher: Packt
ISBN-13: 9781786465153
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image