R Programming
Coding is a form of communication between humans and computers. This has given birth to hundreds of coding languages. R language is an environment for data analysis and visualization. This paper will offer an inexperienced coder with some knowledge of what coding is and its examples. As well as a look into what R is as a language and its uses in the digital world. Recently we can all see that coding is becoming essential for everyone to learn. R is not a language for a beginner but it is worth the time to learn it. I will take you through a brief history of R, the platforms it is used on, its benefits as well as some of its downsides. Examples of writing in R and python, the recent trends, and an introduction to writing R.
History
R was formed as a different application of the older language S. In 1991 R was introduced by Ross Ihaka and Robert Gentleman at the University of Auckland. It was made free to the public in 2000, with anyone with access to it to tinker with it. It’s important to understand the ideology behind the S language to understand R. S wasn’t made as a traditional programming language, it was made for data analysis. The makers wanted users to focus on data analysis first and then gradually go on to programming. R has followed S’s philosophy by providing a language that is understandable in interactive work and developing new tools.
What is R
R is an open-source and cross-platform coding language. R can be confusing at first because it is a platform for many things. It is a computer language, an interpreter, and a platform for visualization of many things. R is free software, letting users have access to study how the program works and improve the program. Users of R have packages to organize their code so that they are able to have it in one place instead of having it scattered. Packages consist of R functions, data, and compiled code. R has a community of users that help each other in making applications and developing packages. R is a complex and important language in many fields.
Platforms
R is the most popular language for statistical programming and applied machine learning. R runs on any computer system and platform. There is an annual release with new features, these releases indicate the growth of the software. Other than its data analysis R is known for its graphics that outdo most of the competition. It’s graphics allow control over the graphs and plots. Because of its amazing data capabilities, it is used in many science fields. R is the statistical analysis language used by programmers all over the world to learn about marketing trends online to help economies thrive.
Benefits
Like anything R has its ups and downs. Let’s focus on the ups for now. R is free software that allows anyone to not only access it but to contribute towards its evolution. It is able to make messy data into organized readable data. R is highly compatible with other programming languages like C and Java and able to run on many different platforms such as Windows and Mac. One of its most appealing features is its machine learning operations such as developing artificial neural networks. Lastly, R is a growing language updating with new features and evolving with the need of humans and computers. It is a gateway to many career choices as companies are demanding more applicants with R experience. Many new projects are ideas that are first to appear on R.
Downsides
R has downsides that make it less appealing than some of the other languages out there. Without prior coding experience, R can be a very difficult language for a person to learn. Since R algorithms are spread out over multiple packages it is tough for a newbie to write algorithms using it. Because of it being spread over many packages it can be slow compared to other languages. It lacks basic security which makes it difficult to be embedded into a web application. R has bad memory management causing it to take up a lot of available space. Benign developed from an old language S, R is incapable of working with 3D. Since R is based on consumer demand, if you need something to change you need to do it yourself.
Examples of code
In comparison to Python, R is more towards statistical analysis whereas python is more general. But R has better visuals when it comes to plots and graphs. Reading in both is fairly simple. An example of the difference in code writing is that for true and false, R use’s all caps (TRUE/FALSE) where python only does the first letter capitalized (True/False). When it comes to loops python is faster than R if the number of iterations is 1000. But when the iterations get more than 1000 R beats python by using the apply function. If statements in both R and python are mostly similar. They are both able to have nested if-else statements. The main difference is the way they’re written. Python uses “if x > 1: print(x)”, R uses “ifelse(x>1, x, 1)” where x if condition is true and 1 when condition is false.
Machine Learning
One of the newer uses of R is machine learning. Machine learning is a branch of computer science that works on studying algorithms that can learn. This study requires a lot of data to be implemented. It is also important to explore all that data before applying it to any learning. This is where R comes in handy. There are a lot of data sets built into R that is used by programmers. Also, there are a number of packages that programmers are able to use, plus they are able to make and install packages that might be helpful. Basic data management tasks are very easy in R which is an important part of machine learning. Organizational data, filtering data, and filling in missing data are all things that are inherent to R. R is great for searching statistical models by just using a few lines of code, another attribute that is useful in machine learning. R beats Python in machine learning, not by much but one of the ways R is said to be better is that it is faster than Python in some parts. When it comes to having to do heavy data analysis and statistical models, R is the way to go. Machine learning is the future for a lot of companies, therefore R will definitely be seen in this branch of computer science.
Trends
R has been growing for the last 5 years, it has a similar growth pattern to Python. In the index, R has made a jump from 20th place to 8th place in just the past year. This is due to schools all over using R for its statistical analysis properties. The biggest reason has to be because of the use of R in the data mining required to find a vaccine for the COVID-19 virus. The biggest industry that uses R is academia, healthcare, and government. R is the top choice for research in social sciences and biology. In healthcare, R is used for clinical studies and bioinformatics. One place where R is not popular is technology, software, and web companies. This is because data analysis makes up a very small part of the tech industry. In recent years there has been a growth in the industries where R was already popular which proves that R is being used more than it was.
Introduction to writing R
In this section I want to teach you to write R. Instead of ‘x = 1’, ‘x < — 1’ is the assigned operator. This shows that in R ‘<-’ is the symbol to assign a variable with a value. To print an item you only need to write the symbol assigned to the item, to print 1 (x < — 1) you need to just type x instead of print(x). To list numbers from 1 to 5, type x < — 1:5, then to print type x and the result will be 1 2 3 4 5. One of the features in R is that you are able to use the infinity function (Inf). To R’s many packages you only need to download and install the packages once. Then to use the packages invoke ‘library(the package you want)’ and you will be able to use the contents of the package.
Takeaway on R Programming
R is an environment for growth and innovation. It’s a language used for statistical analysis, an interpreter, and a visualization platform. S is the mother language of R in a way, R was made as a different application of S. This language is free to the public so anyone has access to prove or add programs to it. Creating a community of people with passion and excitement for the language. R has amazing graphics and abilities to convert messier data into readable organized data. With good things come some bad things. For example, because R is a public software it has low-security measures, it is a difficult language to learn than most which can be unappealing to some. It has poor management of its memory which makes it take up most available space for memory.
In comparison to Python, R is simpler in a lot of ways and better in some ways. They both have similar uses for If-else statements, they just have a slightly different way of writing it. R is better in the long run when it comes to iterations. In just this year R has been making its way to the top. Especially due to the COVID-19 virus R has been in use doing data mining to help in finding a vaccine. As we can see with recent events the use of R is becoming more necessary. There is more demand for coders in the work field so it would be useful to have experience in. Overall R is a platform for innovators and for evolution in the computing industry.