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
Free Learning
Arrow right icon
Modern R Programming Cookbook
Modern R Programming Cookbook

Modern R Programming Cookbook: Recipes to simplify your statistical applications

Arrow left icon
Profile Icon Jaynal Abedin
Arrow right icon
$48.99
Paperback Oct 2017 236 pages 1st Edition
eBook
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Jaynal Abedin
Arrow right icon
$48.99
Paperback Oct 2017 236 pages 1st Edition
eBook
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Modern R Programming Cookbook

Installing and Configuring R and its Libraries

In this chapter, you will be exposed to the recipes on how to install and configure R and its libraries in Windows and Linux platforms. Specifically, you will come across the following recipes:

  • Installing and configuring base R in Windows
  • Installing and configuring base R in Linux
  • Installing and configuring RStudio IDE in Windows
  • Installing and configuring RStudio IDE in Linux
  • Installing and configuring R tools for Visual Studio in Windows
  • Installing R libraries from various sources
  • Installing a specific version of R library

Introduction

It is expected that you have basic knowledge of installing software on the platform that you use regularly. However, it is helpful to have an overview of some technical aspects of installing R and the integrated development environment (IDE) such as RStudio. This chapter will serve as a reference point for the technical issues during installation and configuration of R and its libraries for Windows and Linux platforms. Each of the recipes contains detailed description with the necessary screenshots so that you feel very comfortable, even if you are not in front of your computer. After completing all the recipes of this chapter, you will be confident enough to install R and its libraries in Windows and Linux platforms. So, let’s get started.

Installing and configuring base R in Windows

In this recipe, you will learn to install R in the Windows platform and we will address other necessary configuration issues that are related to the Windows operating system.

Getting ready

To start this recipe, you will need to know your version of the Windows operating system, for example, whether it is Windows 7, 8, or 10. Also, you need to know specific architecture, such as 32-bit or 64-bit. Once you know the particulars of the operating system, you are ready to install base R by following the steps in the next section. Another thing that you need to check is whether R is already installed on your computer or not. You can easily check by inspecting the Start menu or task bar or desktop icon. Now, let's assume that you did not install R previously in your computer and this is the first time you are going to do so.

Once you get detailed information about your operating system, you will need to download the executable file for the Windows operating system. To find the latest version of R, you can visit the Comprehensive R Archive Network (CRAN) at http://cran.r-project.org/. On this web page, you will get to know the latest release of R and other related information.

To download the latest release of R for Windows, perform the following steps:

  1. Visit https://cran.r-project.org/bin/windows/, which will show you the following screen:
  1. On this web page, you will see base under the Subdirectories category. As a first-time user of R, you need to download the executable file from this link.
  2. Once you click on base, you will end up on this page, https://cran.r-project.org/bin/windows/base/ as shown in the following screenshot:
  1. Now, click on Download R 3.x.x (This version number might differ because during preparation of this recipe, the version was 3.3.3) for Windows. The executable file will be downloaded into your local storage.

How to do it...

Once you have downloaded the executable file, you are ready to install it on your computer. Perform the following steps and choose the options accordingly. The screenshots are for your convenience only:

  1. Go to the folder where you have stored the executable file that you have downloaded, by following the instructions in the previous section.
You must have administrator privileges to install the software.
  1. If you have administrator privileges, then just double-click on the executable file, or right-click on the mouse and select Run as administrator:
  1. In Windows 7, it will show a notification with the title User Access Control. In this case, you must choose Yes to proceed.
  2. The first thing it will ask you to do is choose a language, as shown in the following screenshot. Once you select your chosen language, click on the OK button. The R Setup Wizard will appear, and you will see various options to select in different pages:
  1. Click on Next > on this page to proceed with the installation:
  1. On this page, the GNU GENERAL PUBLIC LICENSE information will be displayed, and you will be asked to read and understand the licensing agreement and then click on the Next > button:
  1. Now, you will be asked to choose the destination folder where you want to store the installation files. Usually, by default, it shows C:/Program Files/, and sometimes, it also shows one more level C:/Program Files/R/R-x.x.x. You can keep the default location, or you can choose a separate destination based on your choice. Once you have selected the destination, click on the Next > button:
  1. At this stage, you will get the option to select the component that you want to install. You can choose either 32-bit Files only, 64-bit Files only, or both along with core files and message translation. After selecting the components, again click on the Next > button:
  1. Now, you will be asked whether you want to customize your startup or accept the defaults. The recommended option at this stage is to accept the defaults and click on the Next > button:
  1. You can decide whether you want to create the start menu folder or not and you can specify its name at this stage of installation:
  1. Finally, you will be given the option to choose whether you want to create a desktop icon and also create a quick launch icon. You can specify whether you want to save the version number into the computer's registry or not, and the last option is to associate file name extensions .R and .RData with the software. Once you are done with selecting the options, click on Next > and the installation will be started:

How it works...

Once you follow the steps described in the How to do it… section, the R software will be installed, and it's ready to use. You can open R using either the desktop icon or quick launch icon, or from the Start menu.

However, to do some advanced-level work in R or if you want to open the R console from the Windows Command Prompt, you need to do some configuration that is specific to the operating system. In this subsection, you will see how the configuration works.

If you want to access the R terminal from the Windows Command Prompt, then you must open the Windows Command Prompt, and then type R and press Enter. However, without correctly configuring R, you won't be able to open the R terminal in this way. The following are the steps to configure R:

  1. Right-click on the Computer icon and select Properties from the following screen:
  1. Now, click on Advanced system settings. It will open up the System Properties window as shown in the following screenshot:
  1. At the bottom of the System Properties window, you will see Environment Variables…. Click on it and it will show the following screen:
  1. The Environment Variables window will pop up in which you will see two separate sections, one for User variables and another for System variables.
  2. In the System variables section, select the Path variable and then click on Edit…:
  1. Now, in this Path variable, add the location where you have installed R software. Choose the location where the R.exe and R.dll file belongs, for example, C:\Program Files\R\R-3.3.2\bin\x64.
  2. Put the location at the end of the Path variable after putting in a semicolon (;) and then click on OK on each of the window opened.

Once you have performed the preceding steps, it is the time to check whether you have correctly configured environment variables by performing the following steps:

  1. Go to the Start menu.
  2. Type cmd in the search box.
  3. Then, click on cmd.exe. It will open a black screen called Windows Command Prompt:
  1. Type R and hit Enter. If the R console opens, then everything is alright and you have correctly configured R in Windows:

There's more...

If you want to customize the R console, its display font, font size, and others, you can edit the preferences from the menu. For example, navigate to Edit | GUI preference…. You will see the following screen. You are now able to change anything you want to customize your R console and other things:

See also

In this recipe, you have gone through the steps based on the Windows operating system. If you want to install and configure R for Linux, see the next recipe Installing and configuring base R in Linux.

Installing and configuring base R in Linux

It is not necessarily the case that every user will use Windows platform. In this recipe, you will see how to install and configure R on the Linux platform. Each of the steps is described with an appropriate screenshot so that you can easily understand the steps.

Getting ready

To install R in the Linux operating system, first, you need to know the version of Linux you are using. To know the version of Linux installed on your computer, there are many options. One of the options is the following command:

lsb_release -a

This command will give the release information as shown in the following screenshot:

In this recipe, you will see the example from the Ubuntu 14.04 release.

How to do it...

Once you have the version number, you simply need to install base R onto your computer. The step-by-step procedure is as follows:

  1. Update etc/apt/source.list by adding an entry as follows:
        deb <cran mirror address>/bin/linux/ubuntu trusty/
  1. Replace <cran mirror address> by putting an actual mirror link from the list of available mirrors from https://cran.r-project.org/mirrors.html. Remember that you must have administrator privileges to edit etc/apt/source.list.
  2. Once you have performed the preceding step, type the following command to install R:
      sudo apt-get update
sudo apt-get install r-base
  1. The preceding two commands will complete the installation process and you can check whether R has been installed correctly or not, by typing R and hitting Enter on the Terminal window. If the R console opens, then you are ready to go:
  1. Some of the users may need to compile R packages from the source code. In that case, you will need to install the following component of R:
      sudo apt-get install r-base-dev
Your computer must connect to the internet to install R.

There's more...

In this recipe, you have installed base R into Ubuntu 14.04 release. If your operating system has another release of Linux, then visit https://cran.r-project.org/, select Download R for Linux, and follow the steps outlined there.

See also

To understand how to install an IDE into either Windows or Linux, follow the next recipe.

Installing and configuring RStudio IDE in Windows

In the first two recipes, the steps were related to installing base R. To use R with an IDE where syntax highlighting features are available along with other options, you will need to install a preferred IDE software. RStudio is one of the most popular IDEs for R. In this recipe, you will learn from where, and how, to download RStudio and install it onto your computer.

Getting ready

To install an IDE, the first step is to install base R; that is, you need to make sure R has been installed prior to installing RStudio IDE. RStudio is an open source and enterprise-ready professional software for R. Now, let's take a look at the following few steps to download and install RStudio IDE:

  1. To download open source components of RStudio IDE, visit the web page at https://www.rstudio.com/products/rstudio/.
  1. From this link, choose RStudio for desktop and download the executable file. The latest version of RStudio is 1.0.136 at the time of the preparation of this recipe. Select an appropriate executable file from the list that matches with your operating system:

How to do it…

The following steps will help you go through the installation process:

  1. Go to the folder where you have stored the executable file of the latest release of RStudio:
  1. Right-click on it and select Run as administrator. The installation Wizard will open. Then, click on Next > on this screen.
  1. At this stage, you will be asked to give the location where you want to install it. The default location usually shows as C:\Program Files\RStudio. However, if you want to install into a different location, then you can do this from here and click on Next >:
  1. Now, you will be asked to give a name of the start menu folder and then click on Install.

How it works…

Once you run the executable file of RStudio, it then checks whether there is any base R installed in the computer. If you do not already have R installed, then you will be given a message stating that base R is required to install RStudio. Once you have made sure that base R is already installed, it will install the IDE without any errors by following the steps mentioned in the How to do it… section.

There's more…

The following screenshot is the initial user interface of RStudio where you will see four major components:

Let's take a look at the following four major components shown in the preceding screenshot:

  • In the upper-left section is the R script writing section where you will usually write R code to solve your data analytics, data management, or data visualization problems.
  • In the lower-left section is the R console where you will be able to see immediate output and error messages along the line of code that has been run already.
  • The upper-right section contains the history of R sessions and the current global environment. The environment section displays all current active R objects, their type, and other information.
  • The lower-right corner contains several subcomponents, for example, the Help documentation window, graphical output (the Plots tab), the Files tab showing the list of files and folders in the selected directory, and also the list of R packages (the Packages tab).

See also

There is another similar IDE available, R tools for Visual Studio. This is another IDE developed and released by Microsoft. You will come into this recipe in this chapter.

Installing and configuring RStudio IDE in Linux

In this recipe, you will see how to install RStudio IDE in the Linux operating system. The RStudio IDE user interface will be the same as that in Windows, but the installation process is different. You will walk through the process with the appropriate screenshot.

Getting ready

To install RStudio IDE, the prior requirement is to install base R. Let's assume that base R is already installed on the computer. Now, visit the following web page and download the appropriate installer from the available list at https://www.rstudio.com/products/rstudio/ and store it in the home directory for convenience. Depending on the version of Linux, the executable file comes with the various formats. In this recipe, you will download the .deb file and store it in the home directory. Also, you can directly install it from the internet using the wget command with the appropriate link to the file such as https://download1.rstudio.org/rstudio-1.0.136-amd64.deb.

How to do it…

Once you have downloaded the appropriate executable file, you are ready to install it. Since, you have downloaded the .deb file, you will require gdebi-core to execute that file. Here are the steps to install gdebi-core and then install RStudio IDE:

  1. To install gdebi-core, run the following command:
      sudo apt-get install gdebi-core
  1. To download the RStudio IDE installer .deb file, run the following command:
      wget https://download1.rstudio.org/rstudio-1.0.136-amd64.deb

The preceding command would generate the following output:

  1. To install the IDE, run the following command:
      sudo gdebi rstudio-1.0.136-amd64.deb

The preceding command will generate the following output:

  1. In the preceding screenshot, the terminal is asking whether you want to install the software or not. Type y and hit the Enter button here. Once the installation process is completed, you will see the following screen in the Terminal:
During installation, make sure you are connected to the internet.

How it works...

First, the sudo apt-get install gdebi-core command helps you download and install the gdebi-core package into the Linux system. By using the wget command, you are actually downloading the necessary file to install RStudio from the RStudio website. After that when you enter the sudo gdebi rstudio-1.0.136-amd64.deb command, it installs the software for you, and after completing this step, you are ready to use it.

See also

To know more about RStudio, you can visit the RStudio website for more documentation, but this recipe covered the most basic steps to install the software.

Installing and configuring R tools for Visual Studio in Windows

R Tools for Visual Studio (RTVS) is another development environment for R like RStudio, but it has extended facilities developed by Microsoft. RTVS is an extension of Visual Studio 2015, and it's free with the Community Edition of Visual Studio 2015. In this recipe, you will go through the installation process.

Getting ready

To install RTVS, your computer needs to fulfill some of the following prerequisites:

  • Visual Studio 2015 Community Edition (this is freely available)
  • Visual Studio Update 3 to install RTVS
  • Microsoft R Open/Open source base R 64-bit with 3.2.1 or higher
  • Microsoft R Client

How to do it…

How it works…

Once the installation is completed, the user interface is similar to RStudio. Here is the screenshot of RTVS:

See also

Installing R libraries from various sources

R library or packages refer to a collection of previously programmed functions for specific tasks. When you install base R, you will see that it comes with a number of default libraries installed, but users need to use customized libraries to solve their problems. In this recipe, you will see how you can install libraries from different sources, such as CRAN, GitHub, and Bioconductor (BioC).

Getting ready

Suppose you are interested in visualizing your data using the ggplot2 library, but when you call the library using the library(ggplot2) code, you end up getting an error saying that ggplot2 is not found. Now, you need to install ggplot2. In this recipe, you will install the following libraries from the sources mentioned:

  • The ggplot2 library from CRAN
  • The devtools library from CRAN
  • The dplyr library from GitHub
  • The GenomicFeatures library from BioC

How to do it…

Under the default utils library, there is a function called install.packages() to install a package from within the R console. You can use the command install.packages(). This command will prompt you to select the appropriate server CRAN.

To install packages using this approach, the computer must have an active internet connection.

The ggplot2 library

Lets take a look at the following steps to install the ggplot2 library:

  1. Open the R console or terminal and then type the following command:
      install.packages("ggplot2")

The preceding command line will then ask you to select a server as follows:

      install.packages("ggplot2")
--- Please select a CRAN mirror for use in this session ---
  1. It will now install ggplot2 and its dependent libraries. If you want to avoid selecting a mirror server, then you can specify the mirror server within the install.packages() function using repos=.

The devtools library

This is another library that extends the functionalities of the utils library of base R. This library is convenient for developing various tools within R, and using this library, you can install the required library from GitHub. To install devtools along with its dependent libraries, use the install.packages() function as you did for ggplot2.

Installing a library from GitHub

To install any library from GitHub, you can use the install_github() function from the devtools library. You just need to know the name of the library and the GitHub ID of the repository owner. See the following installation code for the dplyr library from GitHub:

    library(devtools)
install_github("hadley/dplyr")

Installing a library from the BioC repository

To install any library from the BioC repository, you have to use the biocLite.R file and then use the biocLite() function to install the library. The following code snippet is to install the GenomicFeatures library from the BioC repository:

    source(https://bioconductor.org/biocLite.R)
biocLite("GenomicFeatures")

How it works…

In any of the commands to install a library, either install.packages(), install_github(), or biocLite(), first, it connects with the mirror server where the source code / binary-released version of the specified library is located. Then, it checks whether the dependent libraries are installed onto the computer or not. If the required dependent library is absent, then it will download and install those required libraries before installing the one you specified through the command. The command will also search for the location where the installed library will be stored. You can explicitly specify the location or you can use the default. The recommended approach is to specify a location and install all customized libraries into that folder.

To specify the installation location, you can use the lib= option within the function. Make sure you have created the folder that you are going to use as the destination folder. Here is an example:

    install.packages("ggplot2", lib="c:/rPackages")

There's more…

Using devtools, you can install from either CRAN or from GitHub or even from the BioC repository. There are specific functions available within the devtools library as follows:

  • install_github()
  • install_bioc()
  • install_bitbucket()
  • install_cran()
  • install_git()

See also

The user might need a specific version of a library to do a certain task, and that version could be an older one. To install the specific version of the library, see the next recipe that talks about it.

Installing a specific version of R library

Open source software is being updated by the maintainers and new features are being added to the existing ones. Sometimes, a task is dependent on a specific version of a library. In this recipe, you will see how to install a specific version of a library and how to check the version of an installed library.

Getting ready

To install a specific version of an R library, there is another facility available. The necessary functions are bound into the versions library to do this job. You need to install versions before using the function within it. To get ready, you have to run the following command:

    install.packages("versions")

How to do it…

Take a look at the following steps:

  1. If you want to check which version of ggplot2 has been installed onto your computer, you can run the following command:
        library(versions)
installed.versions("ggplot2")

The preceding command will show the following output on the console screen:

        > installed.versions("ggplot2")
Checking package in 'C:/rPackages'
(as 'lib' is unspecified)
[1] "2.2.0"
>
  1. Now, to install the required version of any library, you first need to know the version number and how that has been written in the library documentation. Then, use that version number as follows:
      install.versions("ggplot2", versions = "2.2.0")

How it works…

Whenever you call the installed.versions() function, it looks at the DESCRIPTION file of that library and extracts the version number and displays it on the console.

Alternatively, whenever you call install.versions() to install the specified version of a library, it checks the date of that version and runs the install.dates() function internally to download the appropriate version onto the computer.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Develop strategies to speed up your R code
  • Tackle programming problems and explore both functional and object-oriented programming techniques
  • Learn how to address the core problems of programming in R with the most popular R packages for common tasks

Description

R is a powerful tool for statistics, graphics, and statistical programming. It is used by tens of thousands of people daily to perform serious statistical analyses. It is a free, open source system whose implementation is the collective accomplishment of many intelligent, hard-working people. There are more than 2,000 available add-ons, and R is a serious rival to all commercial statistical packages. The objective of this book is to show how to work with different programming aspects of R. The emerging R developers and data science could have very good programming knowledge but might have limited understanding about R syntax and semantics. Our book will be a platform develop practical solution out of real world problem in scalable fashion and with very good understanding. You will work with various versions of R libraries that are essential for scalable data science solutions. You will learn to work with Input / Output issues when working with relatively larger dataset. At the end of this book readers will also learn how to work with databases from within R and also what and how meta programming helps in developing applications.

Who is this book for?

This book is for developers who would like to enhance the R programming skills. Basic knowledge of R programming is assumed.

What you will learn

  • • Install R and its various IDE for a given platform along with installing libraries from different repositories and version control
  • • Learn about basic data structures in R and how to work with them
  • • Write customized R functions and handle recursions, exceptions in R environments
  • • Create the data processing task as a step by step computer program and execute using dplyr
  • • Extract and process unstructured text data
  • • Interact with database management system to develop statistical applications
  • • Formulate and implement parallel processing in R
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 10, 2017
Length: 236 pages
Edition : 1st
Language : English
ISBN-13 : 9781787129054
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Oct 10, 2017
Length: 236 pages
Edition : 1st
Language : English
ISBN-13 : 9781787129054
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 158.97
R Data Analysis Projects
$54.99
R Programming By Example
$54.99
Modern R Programming Cookbook
$48.99
Total $ 158.97 Stars icon
Banner background image

Table of Contents

9 Chapters
Installing and Configuring R and its Libraries Chevron down icon Chevron up icon
Data Structures in R Chevron down icon Chevron up icon
Writing Customized Functions Chevron down icon Chevron up icon
Conditional and Iterative Operations Chevron down icon Chevron up icon
R Objects and Classes Chevron down icon Chevron up icon
Querying, Filtering, and Summarizing Chevron down icon Chevron up icon
R for Text Processing Chevron down icon Chevron up icon
R and Databases Chevron down icon Chevron up icon
Parallel Processing in R Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela