Introduction to R

R is a comprehensive statistical and graphical programming language which is fast gaining popularity among data analysts. It is free and runs on a variety of platforms including Windows, Unix, and macOS. It provides an unparalleled platform for programming new statistical methods in an easy and straightforward manner.

6 Likes

What are R commands?

Is there any free PDF to learn R for data science?

1 Like

Is ResNet one of the R-CNN model?

Is Python better than R for data science?

1 Like

An R script is simply a text file containing (almost) the same commands that you would enter on the command line of R. ( almost) refers to the fact that if you are using sink() to send the output to a file, you will have to enclose some commands in print() to get the same output as on the command line.

1 Like

ResNet, short for Residual Networks is a classic neural network used as a backbone for many computer vision tasks. This model was the winner of the ImageNet challenge in 2015.

ResNet allowed us to train extremely deep neural networks with 150+layers successfully
Prior to ResNet training very deep neural networks was difficult due to the problem of vanishing gradients.
RestNet is basically a pre-trained CNN model.
It helps to train the model with computer vision task.

How can I swap the rows and columns of an R object?

2 Likes

The transpose (reversing rows and columns) is perhaps the simplest method of reshaping a dataset.

Use the t() function to transpose a matrix or a data frame. In the latter case, row names become variable (column) names.

Python is Object oriented programming language, it is easier to debug a python program.

Python is open source and simple/easy to learn.

Now rather than figuring out if R or Python is better, it is more important to understand the techniques that are involved in executing these tools. These tools are more of communication to us, where in we instruct the tools in order to execute the models we need the results for. In that case, both R and Python does good job and has unique values.

Ex: For various Machine learning models and visualization.

If the focus is only on data analysis, then i would say both R and Python are equally good. But python being a object oriented language, and if you are object oriented programmer already, then Python is better.

As the world is emerging with IT programmers, the developers community know object oriented programming and hence the adoption of data science techniques using python is much easier.

In the recent past, there has been huge adoption of python in data science.

Can you use R-squared to evaluate forecasted data correlation?

We cannot use R-squared to determine whether the coefficient estimates and predictions are biased, which is why you must assess the residual plots. R-squared does not indicate if a regression model provides an adequate fit to your data.

A good model can have a low Rsquare Value. The coefficient of correlation is the “R” value which is given in the summary table in the Regression output. R square is also called the coefficient of determination.
Multiply R times R to get the R square value.
In other words, the Coefficient of Determination is the square of Coefficient of Correlation.

1 Like

Do functions work as r objects?

I need to save R objects into JSON format. What package do I need to use for this?

In R, a function is an object so the R interpreter is able to pass control to the function, along with arguments that may be necessary for the function to accomplish the actions. The function in turn performs its task and returns control to the interpreter as well as any result which may be stored in other objects.

  1. Install rjson Package. In the R console, you can issue the following command to install the rjson package.
  2. Input Data. Create a JSON file by copying the below data into a text editor like notepad.
  3. Read the JSON File.
  4. Convert JSON to a Data Frame.
1 Like

How do you add color to a bar graph in R?

Let’s say, you create a bar-plot using ggplot2:
ggplot(data = diamonds,aes(x=cut)) + geom_bar() Now, there are two ways to add color to these bars. Either you can use ‘fill’ as an attribute inside geom_bar() function of ‘fill’ as an aesthetic in ass() layer.
ggplot(data = diamonds,aes(x=cut)) + geom_bar(fill=“palegreen4”)
With this command, we are using ‘fill’ as an attribute.
Now, let’s use ‘fill’ as an aesthetic:
ggplot(data = diamonds,aes(x=cut,fill=cut)) + geom_bar()

I’m not able to start learn due to access problem already logged in but error coming about batch not started kindly help me to enroll in this course

Hi Mayur,

We are extremely sorry for the inconvenience. To help you with this, Kindly write to us at academy@greatlearning.in with your registered email id and we will help you at the earliest.