Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying R for Data Science
  • Table Of Contents Toc
  • Feedback & Rating feedback
R for Data Science

R for Data Science

By : Toomey
3.4 (5)
close
close
R for Data Science

R for Data Science

3.4 (5)
By: Toomey

Overview of this book

If you are a data analyst who has a firm grip on some advanced data analysis techniques and wants to learn how to leverage the features of R, this is the book for you. You should have some basic knowledge of the R language and should know about some data science topics.
Table of Contents (14 chapters)
close
close

Generating 3D graphics


One of the built-in functions to generate 3D graphics is persp. The persp function draws perspective plots of a surface over the x-y plane. The persp function has many optional parameters and will likely produce the graphics that you need. As a test, you can use the following example function, and it will generate three 3D graphics:

> example(persp)

This function call will generate three graphics.

(Included in the output are all of the commands necessary to generate the graphics.)

The first generated image shows a 3D plot of a rotated sine function. The associated R commands (also generated for you) are as follows:

> persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")

Here's the first generated image:

The next image is a more detailed view of the same data:

Lastly, we have a simulated 3D surface area presentation:

The persp function looks like this:

persp(x = seq(0, 1, length.out = nrow(z)),
      y = seq(0, 1, length.out = ncol(z)),
      z, xlim = range...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
R for Data Science
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon