Data analytics

R allows us to conduct a wide variety of data analytics. Everything we have done with pandas in Python, we are able to do in R as well.

Take a look at the following code:

df = read.csv(file=file.choose(), header=T, fill=T, sep=",", stringsAsFactors=F)

file.choose() means there will be a new window that will allow you to select the data file to be opened. header=T means it will read the header. fill=T means it will fill in NaN for any undefined or missing data values. Finally, sep="," means that it knows how to distinguish between the different data values in the .csv file. In this case, they are all separated by commas. stringsAsFactors tells it to treat all the string values as strings, not as factors. This allows us to replace ...

Get Big Data Analytics with Hadoop 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.