Sie sind auf Seite 1von 24

Algorithm is logical steps to solve problems that are made systematically and logically to

produce the right solution. Initially the algorithm was use for calculations in mathematical
sciences but in its development, the wod moving algorithm was more widely used in the field
of computer programming.

The term of Algorithm is from English Language “Algorithm” and Arabic “Algorism” which
means the calculation process with Arabic numerals. Algorithm are ways to calculate using
Arabic numerals.

In the computer field, Algortihm are defined as sequencesof problem solving step arranged
systematically and logically.

 History of Algorithms

Mathematical historians believe that the word Algorithm originates from the name of the
book Authorand the Famous Arabic Mathematician Abu Jafar Muhammad Ibnu Musa AL-
Khuwarizmi (770-840). Some references write Abu Abdullah Muhammad Ibnu Musa Al-
Khawarizmi.

Westerners reate Al-Khawarizmi with Algorithm. Either because Al-Khawarizmi is a clever


algoritmist, then for the next it is know as Algorism as a definition for the steps to solve a
problem that produces a solution by weterners.

Al-Khuwarizmi was born at khwarizm(kheva), a city located south of the Oxus River (now
we called it Uzbekistan). When he wwas achild, he moved with his parents to south of
baghdad(Iraq). One of AL-Khuwarizmi’s famous book is Kitab Aljabar Wal-Muqabala
which means “ Book of restoration and reduction” (the book of restoration and reduction)

From the title of the book it was also obtained the word “Algebra” which is now a branch of
mathematics.

Anothe source of writing an algorithm is a special method that is appropiate and consists of a
a series of steps that are structured and written mathematically, which will be done to solve a
problem with the help of a computer.

Just a strong building has a good frame structure. Likewise, a good program or application
must also be compiled by a good programming structure. The technique of structuring a
program is called an algorithm.
when talking about algorithms, it must be related to programming. programming is
useful in facilitating processing data in statistical science. but previously we will discuss
about computers because programming is closely related to computers.

Computer History - The existence of technology greatly helps human life in carrying
out their various jobs. Technology makes people not feel difficult, so they will be facilitated
in their respective jobs. Like now, for example, a computer has been created since a few
years ago, creating a computer history that needs to be known.

Like a double-edged knife, technology can be useful if used correctly. Conversely, if


used for things that are not true, technology becomes useless. Smart people of his time
created various inventions which until now have undergone continuous development so that
new technologies emerge.

Like for example the discovery of a bicycle that in ancient times had large wheels and
now you can see the difference. These changes are made so that someone can feel the
benefits and convenience in using these technologies. Likewise with computers that currently
have various forms

we must know the history of computers and their development which of course can
open your horizons about computers. But beforehand, you need to know in advance the
definition of the computer and its functions so that you are not wrong in using a computer.
The following are computer definitions and their functions

Computer is a tool that is usually used to process data based on predetermined rules.
A computer also has a definition of an electronic device that has several components that
work together and form one system. So that a computer system can run various programs..

In language, computers come from Greek, namely computare. The word computare is
a combination of the word com which means to combine and putare which means thinking of
calculations. Whereas in English, computare is called to compute or count

If described in the opinion of experts, a computer can be interpreted as a tool that can
perform tasks to receive input, process input, store, and make output. This opinion from
Robert H. Blissmer is also an understanding of computer systems that are currently widely
used for various electronic devices.

According to Elias M. Awad, computers are calculators that can process data which
are then presented in the form of data. Both digital data and analog data. Whereas according
to William M. Fuori, computers are tools for processing data that can also do calculations
quickly.

Computer functions
If you are given a question about what the function of the computer is, of course some
of you answer with different answers. There are those who answer to work, play games,
watch movies, etc. Actually, the computer has 4 main functions that already exist in the
understanding points above. That is accepting input, processing input, storing input, and
presenting output.

Input is one of the functions of a computer that is useful for receiving data and
information from outside. Processing is a function that is useful for processing incoming data
and will be stored in internal memory. While the output function is to display data that has
been entered and you can see the results.

The First Computer Inventor


The inventor of the first computer was Charles Babbage, known to the world as one of
the first inventors of computer history. Who has given many works to human life until now,
from his discoveries.

The counting machine or can be known as the Difference Engine No. 1 found by
Chareles Babbage. Is one of the icons, the most popular and famous in history.

Babbage is also known by the nickname of the father of computers, The Charles
Babbage Foundation, he uses his name to appreciate the services of its inventor to the world
of computers.

Computer Development

History of Computer Development always experiences development from generation


to generation, always changing. and how the history of computers has happened.

Of course, behind the process of computer history from the past to the present, there
are those who started. We can call the inventor of the computer, because computers have
been around for a long time now.

History of the development of the computer generation from the beginning, ranging
from first generation computers, second generation computers, third generation computers,
fourth generation computers, until now the current generation, has been divided into 5 times,
the development or generation of computers.

What is the history of each generation of computer development? as follows.

History of First Generation Computers (1946-1959)


The history of first generation computers is digital electronics or can be called ENIAC
(Electronic Numerical Integrator and Calculator). Is one that is used as a general need.

The program on ENIAC, was designed in 1942, and only began to be done in 1943 by
John Presper Eckert and Dr. John W. Mauchly at the Moore School of Electrical Engineering
(University of Pennsylvania) and finished in 1946.
The form of the ENIAC program is very large, in the placement of the program
requires space of 500m2. ENIAC uses 18,000 vacuum tubes, and 75,000 relays and switches,
10,000 capacitors and uses 70,000 resistors.

When it started operating, ENIAC needed a very large electric power of 140
kilowatts. With a machine weight of more than 30 tons, and consuming a lot of space 167
m2.

The first computer software has been developed, namely computers as the design of
aircraft and missiles. One of the scientists working on the development concept was Konrad
Zuse, an engineer from Germany.

In the mid 1940s, John Von Neumann (1903-1957) joined the University of
Pennsylvania team. In the process of building a computer design concept for the next 40
years it is still used in the technique of assembling computers.

Von Neumann designed EDVAC (Electronic Discrete Variable Automatic


Computer) in 1945 with a memory to accommodate both programs and data. This kind of
technique allows making a computer to stop at a time and then resume work.

The main role of the Von Neumann architecture is the central CPU processing unit
(Central processor unit), which is capable of all computer functions coordinated through a
single source. The characteristics of the first generation computer are the CPU.

The history of generation 1 computers has special characteristics, namely the


instructions in the operation are made specifically for a particular task. Every computer has a
program like binary code.

Each of the different is called Machine Language. This causes computer programs
to be hard to program and limit the speed.

The characteristics of the First Generation Computer are:


1. The physical size of computer hardware is larger, requiring extensive space.
2. Operation instructions are made specifically for certain tasks.
3. The program can only be made using machine language.
4. The computer has a magnetic cylinder to store data.
5. Uses the Deposits of Outdoor Magnetic Tape and Magnetic Disks.
6. Requires large electrical power.
7. The temperature is hot, so it needs a cooler.
8. The storage is small.
9. The process is not fast enough.
10. Using the concept of stored program with its main memory is Magnetic Core Storage.
11. The Circuit Uses a Vacuum Tube. The use of Hollow Tubes made the size of the
computer at that time very large.
The central processing unit contained in generation 1 computers is the first machine
used to operate all computer systems.

Computer devices were first developed, namely, the design of aircraft and missile
computers. The scientist who initiated the concept of development was Konrad Zuse, a
German engineer.

Then, in the mid-1940s, the history of the computer was changed again starting a
further development, carried out by John von Neuman.

The main characteristic of the first generation computer is the CPU. The central
processing unit contained in first generation computers is the first machine used to operate all
computer systems.

While the main program contained in the first generation computer is "machine
language".

History of Second Generation Computers (1959 - 1964)


Changes in important discoveries have occurred in the second generation. Namely
transistors, sophisticated tools that are able to maximize computer performance with only a
very small size.

The discovery of this tool, was able to influence the development of computers in
the second generation, quickly. In 1959-1960, scientists began working on second generation
computers.

Some of the institutions, companies, universities and governments have used the
sophistication of second generation computers. The purpose of the discovery of this second
generation computer is the transistor, which is able to make the history of second generation
computers, smaller than the first generation computers.

The first machine to use this latest technology is super computers. IBM has made a
super computer called Stretch, and Sprery-Rand and made a computer called LARC.

The history of computers developed in atomic energy laboratories can overcome a


large amount of data, a capability that is needed by atomic researchers.

The prices of these machines are very expensive and tend to be too complex, as
business computing needs, thus limiting their popularity. Only two LARCs have been
installed and used, one at Lawrence Radiation Labs in Livermore, California, and the other at
the US Navy Research and Development Center in Washington D.C.

Second generation computers have replaced machine language positions with


assembly language. And assembly language is a language that uses words as a substitute for
binary code.
In the early 1960s, a second generation of computer history began to emerge that
had successfully rolled out in the business field, at universities and in government. This
second generation computer has fully used transistors.

They also have components that can be combined with current computers such as
printers, storage on diskettes, memory, operating systems, and programs.

One important example of a computer at this time was the type IBM 1401 which was
widely accepted in industry. In 1965, almost all large businesses used second generation
computers to process business financial information.

Programs that have been run are stored on the computer and the programming
language in them provides flexibility to the computer.

The first digital computer has a very large shape size, and a high cost to make it.
computer functions in the second generation are mostly only used as scientific calculations.

History Computers in the second generation also have their own storage systems.
Namely, the main memory capacity can be obtained from. Magnetic Core Storage and uses a
form of external storage, in the form of Magnetic Tape and Magnetic Disk.

Transistors compared to tubes, transistor technology is much easier and more efficient,
as a switch and can be reduced to a microscopic scale.

In 2001 Intel researchers introduced silicon in the smallest and fastest form in the
world, with a size of 20 nanometers or comparable in size to a billionth of a meter, which can
be used on processors with speeds of 20 GHz (Giga Hertz).

The characteristics of the Second Generation Computer are:


1. Already using operations in high-level programming languages COBOL and
FORTRAN.
2. The main memory capacity has been developed from Magnetic Core Storage.
3. Using deposits from outside in the form of magnetic tape and magnetic disk.
4. Ability to do real-time and real-sharing processes.
5. Its physical size is smaller when compared to first generation computers.
6. The operating process is faster, which can do millions of operations per second.
7. The need for electricity is smaller.
8. The orientation of the use of the program is no longer focused on business
applications, but also on technical applications.

In the era of second generation computers, it also signaled the beginning of the
emergence of the second largest minicomputer in the computer family. The price is cheaper
than the first generation. The DEC PDP-8 computer is the first minicomputer made in 1964,
as commercial data processing.

Other types of computers have emerged in this generation including UNIVAC III,
UNIVAC SS80, 1107, and SS90, IBM 1400, 7080, 7070, and 1600.
The advantages of computers in this era are the efficient forms that are not as big as
before, computers in this generation are also wider in the application of life. Such as aspects
of health, education, industry and others.

While the disadvantages of computers at this time are in terms of transistors that
produce a lot of heat that is large enough, which will potentially damage the internal parts of
the computer, namely quartz rock (quartz stone).

In assembly language codes such as abbreviations are used to replace binary code. This
computer is able to calculate payrolls, design products, print data so that second generation
computers are successful in the market.

History of Third Generation Computers (1964 - 1970)


Third generation computers are developments that go through very rapid stages of
the development of existing computers. Third generation computers have emerged since the
1964-1970s.

In its use, transistors make computer performance heat faster. So, making second
generation computers obsolete. Then one of the scientists named Jack Billy, tried to do
research again

Then in 1958, he had created a more sophisticated component, compared to the


transistor that made the computer heat up earlier. The invention is IC or an integrated small
circuit chip that is able to collect and accommodate many components into one.

In this third generation the history of computers Integrated Circuit (IC) technology is
one of the main characteristics. Because it began to be familiar and is widely used on a
computer device until the current generation.

The IC was first made by a person named, Texas Istruments and Fairchild
Semiconductor in 1959 which contained only six transistors. We can try to compare it with
the current processor that we use has millions, tens, hundreds of millions of transistors..

Even processors that have billions of transistors have been designed. From an
extraordinary development in less than half a century.

The characteristics of third generation computers are:


1. The use of electricity is more efficient.
2. Software enhancements.
3. The price is getting cheaper.
4. Larger memory capacity, and can store hundreds of thousands of characters
(previously only tens of thousands).
5. Because it has used IC, the computer's performance becomes more precise and faster.
6. Its speed is almost 10,000 times faster than first generation computers.
7. Ability to do multiprocessing and multitasking.
8. Has used the visual terminal display and can make a sound.
9. Using external diskette storage media (external disk) which is the nature of accessing
data randomly (random access) with large capacity (millions of characters).
10. The ability to communicate with other computers.

UNIVAC 9000, Burroughts 5700, 6700, 7700, IBM S / 360, UNIVAC 1108, GE
600, CDC 3000, 6000, NCR Century, and 7000, PDP-8, and PDP-11 (manufacturers namely
Digital Equipment Corporation) History computer, above is an example of a third generation
computer.

That way, the size of the computer becomes simpler and smaller. In the third
generation computer is also faster in the operating system sector and is able to run several
programs simultaneously.

History of Fourth Generation Computers (1979 - 2000s)

The fourth generation computer is regeneration from the 3rd generation, the
regulation that ICs on 4th generation computers are more complex and integrated compared
to the previous generation, namely the third generation.

In the fourth generation, computers have started to use IC chips, then they are just
beginning to be developed again. By the company Very Large Scale Integration. To try to
work on this development since the 1980s. As a result, a single chip can accommodate
thousands of components.

Since 1970 two developments have been considered as the 4th generation computers.
First, the use of Large Scale Integration (LSI) can be called Bipolar Large Large Integration
Scale.

LSI is a compilation of thousands of ICs, which are incorporated into an IC chip that
we can call the chip name. The term mention of the chip is used in showing a rectangular,
rectangular plate containing an integrated IC circuit.

LSI can then be further developed into VLSI (Very Large Scale Integration) that can
accommodate tens of thousands or even hundreds of thousands of ICs.

Then it was further developed into a micro computer, which uses semiconductors and
chip-shaped microprocessors. As a temporary internal computer memory, while the previous
generation only uses magnetic core storage.

The Intel company from 1971 has introduced a 4-bit microcomputer that has used a
4004 processor chip containing 230 transistors and runs at 108 KHz (Kilo-Hertz) and can
execute up to 60,000 operations per second.

Continued again in 1972, Intel introduced a microcomputer with the name 8008 that
was able to process 8 bits of information at one time. Subsequently it was continued with an
8080 microprocessor made in 1974, and which was the first general purpose processor to be
successfully developed.
If previously the 4004 and 8008 processors were designed only as specific
application needs, and 8080 processors had faster performance capabilities and had richer
instruction sets, and had greater ability to address larger ones.

The history of computers in the fourth generation has a monitor display, it still uses
one color (green color).

Fourth generation computers include Apple II, PDP-11, VisiCalc, and IBM 370,
Apple I and Altair that have used Intel 8080 processors, with the CP / M (Control Program
for Microprocessor) operating system, with Microsoft Basic programming language (
Beginners Allpurpose Symbolic Instruction Code).

The characteristics of fourth generation computers are:

1. Using LSI (Large Scale Integration).


2. Micro computers are developed that have used semiconductor and micro-processor
chips for computer memory.
3. Fourth generation computers include: AT, IBM PS / 2, IBM PC / 386, IBM 370,
Apple II, IBM PC / XT, IBM PC / IBM PC / 486.) IBM Pentium II

For the record that none of these fourth-generation computers are PC-Compatible or
Macintosh-Compatible. So that this generation does not yet have a standard computer,
especially a personal computer (PC).

From here, the term "personal computer" or PC appears. That is, computer devices
began to be marketed to the individual sector. Of course not only that, there is a new
computer device that is easy to carry around, Laptop.

History of Fifth Generation Computers (Now)


The fifth generation computer, which is currently, is being developed a lot by various
electronic vendors. The fifth generation computer is often called the next generation
computer.

In further developments there will be many major changes taking place, that since
IBM-PC was introduced and not the only PC-compatible manufacture.

So the new standard in the world of the PC industry, will be more applied and more
developed by other companies. Like Intel and Microsoft, which was pioneered by W. Bill
Gates, who has now become a pioneer in world hardware and software standards.

Some of the evidence is the emergence of smartphones, tablets, phablets, netbooks,


ultrabooks, and many more, the latest discoveries at this time that we can meet.

The history of the development of fifth generation computers is computers, which


we use today. This generation is characterized by emergence. LSI (Large Scale Integration)
which is a compaction of thousands of microprocessors in a microprocessor at this time.
In addition, it is also marked by the appearance of semi conductors and
microprocessors.

Companies that have made micro-processors include Intel Corporation, Zilog,


Motorola, and many more. In the market we can find it easily, with the microprocessor from
Intel with models 4004, 80386, 8088, 80286, 80486, and Pentium.

The Pentium four is the latest production output from the Intel Corporation
company which is expected to be able to cover shortcomings and weaknesses in the future.
On the previous product. besides, the ability and speed that the Pentium-4 has also increased
to 2 Ghz.

In 2001 Intel has successfully launched the Itanium processor, a processor based
on the first 64-bit (IA-64) architecture of Intel products.

Itanium is the first processor owned by Intel with 64-bit instructions and will
release the latest generation from operating systems and applications, while Intel products
still maintain backward compatibility with 32-bit software.

It needs to be understood in advance that since the issuance of the 386 processor,
the computer was able to operate at 32 bits per unit time in executing information up to
Pentium 4. At this time most computers used still often use 32-bit based ones.

In the Pentium generation, in addition to the special features possessed of


improving the data access speed performance and also the image display has a resolution
(image quality) is good and colorful and multimedia also supports, and more importantly, the
functions of computer components become smarter.

Although computers in the current generation, with physical size, are smaller and
simpler but have the ability to be more intelligent and sophisticated in pengoprasiaya.

In this fifth generation, a development effort called Josephson Junction has been
carried out, a technology that can replace chips. Which can have the ability to process
trillions of operations per second, while chip technology can only process billions of
operations in a second.

Computers in the fifth generation will be able to translate human language,


humans can directly talk to computers and the ability to save computer energy.

Extraordinary properties can be called "Artificial Intelligence", besides that it is


also GUI (Graphic User Interface), multicommunication and multimedia based.

Examples of computers that were born in the fifth generation, which are x86-
based, such as the 286 chip that was introduced in 1982 with 134,000 transistors, followed
the 386 chip in 1983 with 275,000 transistors, then the 486 chip was introduced in 1989 that
had 1.2 million transistors .
Then in 1993 Intel began introducing a family of 586 processors called the
Pentium 1 and the number of transistors 3.1 million to run 90 MIPS (Million Instruction Per
Second). Next Then proceed to the next generation namely Pentium 2, 3, and 4.

The images displayed in this generation become smoother and sharper, besides the
speed of processing performance, and in sending or receiving images also becomes faster.

With computer technology at the moment, it will be difficult to imagine how the
future of computers will be. With the technology that exists at this time, we seem to have
"grasped the world" because of the sophistication that they have.

From the technology side of some of the world's computer scientists, they have the
belief that someday it will be created, what is called a biochip, which is made from a cytetic
protein material. Robots made with materials like this will later become like artificial
humans.

While the technology that is currently in the process of research is microoptics, and
audio input-output that can be used for future generations of computers. Computer science
experts are now starting to try to assemble computers that do not require user writing and
programming.

Computers without programs (programless computers) may form the main feature
of the generation of computers that will be developed in the future.

The characteristics of fifth generation computers are:

1. Still using LSI technology, which of course has a lot of development


2. More and more features
3. Much faster information processing

In principle, the characteristics of computers in the future are more sophisticated and
cheaper and have the ability to see, speak, hear, and be more sophisticated. As well as being
able to make conclusions like humans.

This means the fifth generation computer has artificial intelligence, which approaches
human capabilities and behavior. Another plus, intelligence to predict an event that will
occur, can communicate directly with humans, and the smaller form has a lot of computer
history, which we can meet.

But we cannot deny that pen and paper are stationery and symbols that we naturally
accept, only a matter of time until someone finds the latest sophisticated products with the
concept of smart pens or smart papers.
Complete History of Computers

After knowing the definition of computers and computer functions, of course


you must know the history of the computer and its development. So when you
are given a question about the complete history of a computer, you can explain
it correctly. For this reason, the following is a complete history of computers.

1. Generation of Vacuum Tubes


Computer creation was first created in 1946 and used vacuum tubes for standard
components on this computer. The use of vacuum tubes is very inefficient because it can
produce excessive heat and requires large electrical power. This computer was made by
Mauchly using 18,000 vacuum tubes measuring 1800 ft2 and weighing 30 tons.

This first generation computer still uses machine language as its programming
language. Machine language itself is also the most basic programming language and can only
be understood by computers. At one time, first generation computers could solve problems
with limited capabilities.

The input used on this first generation computer uses a punched card and paper tape.
As for the output used, the first generation computer uses output in the form of print-out.
Almost around 1 million dollars was spent on making computers that were amazing in their
time.

2. Transistor Generation
The history of computers continues in the transistor generation. The existence of this
transistor can also be a sign of the emergence of the second generation of computers. So that
the vacuum tube was replaced with this transistor which can improve the technology at that
time.

This transistor technology was used around 1959 until 1965. When viewed again, the
size of the transistor is much smaller than the vacuum tube. Apart from size, the heat
produced is also less. Not only that, failure rates tend to be smaller. So, transistors can be
better computers than computers with vacuum tubes.

For programming languages used on this computer, of course using different


programming languages. If previously using machine language, this generation already uses
assembly language. During this time, CBOL and FORTRAN programming languages were
also being developed.

3. IC Generation
For the third generation, computers at this time used integrated circuits or ICs instead
of transistors. The transistor in the previous generation was reduced and then placed on the IC
which in the IC consists of various transistors, resistors, and capacitors. This technology was
first developed by an electrical engineer named Jack Kilby.

Jack Kilby was later awarded the Nobel Prize for the discovery of this third
generation computer. This is because the invention can make computers faster and more
efficient and make computers with ICs faster than the previous generation.

In addition, the IC computer is the first computer to use a keyboard and monitor
which previously used paper. Because of its smaller size and cheaper price, people at that
time could buy this computer.

4. Generation of Microprocessors
Computer history and its development continues to the microprocessor which is still
used by the public, including the people of Indonesia. The beginning of this microprocessor
computer was made by IBM in 1971 which later in 1984 Apple released the Macintosh.

The birth of this generation of microprocessor computers is also a marker of the birth
of the internet. The development of this computer can be seen with the GUI as a display,
mouse and portable computer or laptop.

5. Generation of AI
The history of the computer and its development continues to this day to create a
technology called AI. The generation of computer AI means that this artificial intelligence
can make better inputs.

Even with this AI technology, we can input language spoken everyday and can study
the surrounding environment and adjust the situation. So that AI technology is considered to
be the latest breakthrough of computers, not infrequently also many developers who use AI
systems.
Cover
The existence of current technology can facilitate human work in its work, one of
these tools is a computer. The definition of computer itself can be interpreted by a tool to
receive input and process it which can then display output.

The history of computers continues to grow from time to time which has been stated
in the points above. By knowing the complete history of this computer, the definition of a
computer, as well as the functions of this computer certainly can make our minds open. In
addition, we can accept the development of the times and can use technology well.

Now maybe all of your computer history should be known, hopefully the first, second,
third, fourth, and fifth generation computer examples that I have shared with each computer
image, above can add to your insight, so that it can make a history of computer papers always
remembered and studied at all times.
After knowing the history of computers carefully, we will discuss about programming. In
Statisca we usually use R programming for help processing the data fluently.

 The history of “R”

R is one of the languages in statistical programming. R is based on the S programming


language developed by Bell Laboraties (formerly AT & T, now Lucent Technologies) by
John Chambers and friends. R is an open source version of the S language (which is used in
S-PLUS paid software) which is widely used by researchers to work on their statistical
methods.

R was first introduced in 1996 by two statistics professors Ross Ihaka and Robert Gentlemen
from the University of Auckland in New Zealand, they released the code as a free software
package. According to them the idea of planning something like R appeared throughout the
conversation between the two of them who wanted technology that was more suitable for
statistical students who wanted to analyze data and produce graphical models of existing
information or data because some existing software was designed and designed by computer
experts who turned out cause these software to be more difficult to use. Therefore since 1991
they have worked full time to make R.
However, some statisticians who first saw this software felt that there were still a few things
missing from this software, although R immediately got the attention of people who saw the
possibility of developing the software.

Excess R

So what is the excess R compared to other statistical software?

1). R is open source software so that people do not need to buy a license or steal
opportunities by hijacking to use it other than that because R is open source so that people
who are interested in learning more deeply, then the possibility is open not only can "use" the
application program, but can "develop", or "create" a similar application program by looking
at the accompanying source code.

2). R was developed by a core team consisting of experts in statistics, computers and
programming, geography, economics from different institutions throughout the world, so it is
clear that R is truly powerful for even complex statistical analysis.

3).R can interact with other statistical programs such as SPSS, Microsoft Excel, Minitab,
SAS, Systat, EPinfo besides its "close relatives" namely S-PLUS by providing data export
and import facilities.

4). R is multiplatform which can be installed and used in both Windows operating systems,
UNIX / LINUX and Macintosh.

5). For intensive computing purposes, code C, C ++, and Fortran can be linked and called
together on R, Advance users can write C code to manipulate R objects directly.

In addition to the advantages above R also has advantages in terms of features and
completeness it has, namely:
1). R is effective in terms of data management and storage because the size of the saved
file is smaller than other software.

2).R has an attractive graphical display and can be modified as desired by the user.

3). R is equipped with a series of operators for calculations in arrays, especially matrices.

4). User interaction with R can be done using the R console or by using the GUI (R-
commander) menu, but in the GUI version the statistical analysis provided is still limited.

With the advantages it has it is not wrong if Daryl Pregibon, a scientific researcher at Google,
says "R makes statistics can do complex and difficult analyzes without knowing the
computing system.

 R Characters
Another important thing that R (or other programming languages have) is storing data
into variables. Variables can be likened to a label for information. Variables can also
consist of some information.

Data on R consists of 2 Types / Types:


1. Data based on Variable Types
2. Data based on Tables
R has various flexibility in giving variable names, however, some of the rules for naming
variables that need to be known are as follows:

Using uppercase letters (capital), the letters A-Z also use lowercase letters, namely
letters (a-z)
Use numeric characters (0-9), also points (.) Or underlines (** _ **)
Cannot use spaces, for example variable writing: "book price" "is a wrong example of
variable naming, can be replaced with a variable like this:" price. Book "
Variables made are case sensitive, meaning typing must be exactly the same and
distinguish between uppercase and lowercase letters. For example Hargabuku and my
book are two different variables.
Variable naming should start with letters, even though you can give the name of the
variable with _hargabuku or .hargabuku except that naming is not recommended
It is better to avoid using the same words with commands known as R such as: if, else,
repeat, while, function, for, in, next, break, TRUE, FALSE, NULL, NA, NA_integer and
so on.

1. Data based on Variable Types

a. Numeric Variable
a <-25

these variables can be used for further calculation operations ...

b <-10
c <-a + b
c

## [1] 35

b. String Variables (Text)

ab <- "Hello"
ab

## [1] "Hello"

c. Date Variable (Date)

today <- Sys.Date ()


print (today)

## [1] "2017-01-16"

If you want to add 1 year the way is:

today <- Sys.Date ()


today2 <-today + 365
today2

## [1] "2018-01-16"

d. Vector Variables (Vector)

R can do arithmetic operations, follow commands in sequence, use certain functions, create
variable names. Now we will learn how R can do vector-shaped arithmetic operations.

Try creating a vector containing the numbers below

c (4, 7, 9)

## [1] 4 7 9

Function c (c stands for Combine) creates a new vector with a combination of these numbers.

Now make a vector worth of strings:

c ('a', 'b', 'c')


## [1] "a" "b" "c"

Vector cannot store data of different types or values.

Try typing the instructions below and see the results

c (1, TRUE, "one")

## [1] "1" "TRUE" "one"

All are converted to one character type (string)

* Vector Sequence

Vector can be made in a certain number sequence with a start: end notation

Let's make a vector from numbers 3 to 9

3: 9

## [1] 3 4 5 6 7 8 9

Another way you can use the seq function:

seq (3, 9)

## [1] 3 4 5 6 7 8 9

it allows you to determine the order according to your wishes, for example the order of the
increase is 0.5:

seq (10,20,0,5)

## [1] 10.0 10.5 11.0 11.5 12.0 12.5 13.0 13.5 14.0 14.5 15.0 15.5 16.0 16.5
## [15] 17.0 17.5 18.0 18.5 19.0 19.5 20.0

 Vector operations
We will create a vector that contains several texts (strings) and store them in an
activity variable:

activities <- c ('eat', 'sleep', 'learn')

You can just display the "learning" variable the way:


activities [3]

## [1] "learning"

You can replace the new value on an existing vector.

Replace the third word in an activity vector with the word "shopping"

activities [3] <- "shopping"

If you want to add value, the vector will allow it.

Add the word "test" to the fourth word on the activity vector:

[4] activities <- 'exam'

You can use parentheses () to access various values. Try displaying the first word and
the third word in the activity vector:

activity [c (1,3)]

## [1] "eat" "shopping"

Now display the values from the second word vector to the fourth word:

activity [2: 4]

## [1] "sleep" "shopping" "exam"

* Vector Names can process names in a vector containing a second


vector
Notice the example below:

ranking <- 1: 3

names (ranking) <- c ("first", "second", "third")

names are used to access values on a vector.

How to display the "first" value in the ranking vector:

["first"] ranking

## first
## 1
 PLOTS SCATTER

The plot function has 2 vectors, one for X and one for Y, Y is usually used to graph

x <- seq (1, 20, 0.1)


y <- sin (x)
plot (x, y)

Now try to create a vector in descending order from 9 to 5. Suppose we want to create a
height variable that has values: 120,100, 165, 142, 97, 110, 150, we can instruct R to combine
these values using functions concatenate; c. This is one of the most important functions and is
often used in R.

a <- c (120,100, 165, 142, 97, 110, 150) # numeric vector


b <- c ("one", "two", "three") # character vector
c <- c (TRUE, FALSE, TRUE, FALSE) #logical vector

2. Data based on Table (Table Type)

Matrix Variables (Matrices)

Matrix is a 2-dimensional array consisting of abscissa and ordinate making a matrix


with 3 rows and 4 columns with a value (field) = 0
matrix (0,3,4)

## [, 1] [, 2] [, 3] [, 4]
## [1,] 0 0 0 0
## [2,] 0 0 0 0
## [3,] 0 0 0 0

You can also determine the value of the matrix.

To make a 3x4 matrix containing the values 1 to 12 the way is:

a <-1: 12

print (a)

## [1] 1 2 3 4 5 6 7 8 9 10 11 12

matrix (a, 3,4)

## [, 1] [, 2] [, 3] [, 4]
## [1,] 1 4 7 10
## [2,] 2 5 8 11
## [3,] 3 6 9 12

Advanced Matrix variable (Advance Matrices)

form1 <- matrix (a, 3,4)


form1

## [, 1] [, 2] [, 3] [, 4]
## [1,] 1 4 7 10
## [2,] 2 5 8 11
## [3,] 3 6 9 12

see the matrix value in row 2 column 4:

form1 [2,4]

## [1] 11

How do I display all values in line 2?

form1 [2,]
## [1] 2 5 8 11

How do I display all values in column 4?

form1 [, 4]

## [1] 10 11 12

Plotting Matrices

elevation <- matrix (1,10,10)


elevation [4,6] <- 0
elevation

## [, 1] [, 2] [, 3] [, 4] [, 5] [, 6] [, 7] [, 8] [, 9] [, 10]
## [1,] 1 1 1 1 1 1 1 1 1 1
## [2,] 1 1 1 1 1 1 1 1 1 1
## [3,] 1 1 1 1 1 1 1 1 1
## [4,] 1 1 1 1 1 0 1 1 1 1
## [5,] 1 1 1 1 1 1 1 1 1
## [6,] 1 1 1 1 1 1 1 1 1
## [7,] 1 1 1 1 1 1 1 1 1
## [8,] 1 1 1 1 1 1 1 1 1
## [9,] 1 1 1 1 1 1 1 1 1
## [10,] 1 1 1 1 1 1 1 1 1

persp (volcano, expand = 0.2)


R provides facilities for instructions that make it easier for us to make a matrix. If we
want to make a 3 X 3 matrix with a sequence of numbers from 1 to 9, the method is as
follows:

matrix (c (1,2,3,4,5,6,7,8,9), nrow = 3, byrow = TRUE)

## [, 1] [, 2] [, 3]
## [1,] 1 2 3
## [2,] 4 5 6
## [3,] 7 8 9

Notice the order of the matrix above is from left to right because the command given
above is matrix (c (.... byrow = TRUE)

If you want to make a matrix in the order from top to bottom and save it in the tm
variable, then the command is as follows:

tm <-matrix (c (1,2,3,4,5,6,7,8,9), nrow = 3, byrow = FALSE)


tm

## [, 1] [, 2] [, 3]
## [1,] 1 4 7
## [2,] 2 5 8
## [3,] 3 6 9

We can also do arithmetic operations on the matrix, for example, want to multiply by
10, how:

tm2 <-matrix (c (1,2,3,4,5,6,7,8,9), nrow = 3, byrow = FALSE)


tm2 * 10

## [, 1] [, 2] [, 3]
## [1,] 10 40 70
## [2,] 20 50 80
## [3,] 30 60 90

Or add between vectors:

ta <-matrix (c (1,2,3,4,5,6,7,8,9), nrow = 3, byrow = FALSE)


tb <-matrix (c (10, -2,5,8,105,66,87,80,91), nrow = 3, byrow = FALSE)
tc <-ta + tb
tc

## [, 1] [, 2] [, 3]
## [1,] 11 12 94
## [2,] 0 110 88
## [3,] 8 72 100

Factor (Factor)

factor (factor) is an R object created using a vector. The data will be saved as a label.
Here's how:

# Make a vector
color <- c ('green', 'green', 'yellow', 'red', 'red', 'red', 'green')

# Create an object factor.


factor_warna <- factor (color)

# Print the factor.


print (factor_warna)

## [1] green yellow red green red red green


## Levels: red yellow green

print (nlevels (factor_warna))

## [1] 3

The explanation above is talk about shape of R generally. R programming is the based
programming that used in statistic.

Das könnte Ihnen auch gefallen