CONCLUSION

Conclusion

All of this is a lot of information, and just the tip of the iceberg of the things that can been done in R. This is just opening the door to a new way of taking care of your data, performing your analyses, coming up with beautiful graphs and much more. We’ll talk about those possibilities in the next classes.
R is a powerful program, free, where you are in total control of what you are doing.

Exercise 1.1

 – Create 2 vectors named ‘vecA’ and ‘vecB’ of any 10 positive numbers.

 – Create a 3rd vector ‘vecAxB’, results of the multiplication of the 2 previous vectors

 – Create a data frame ‘ex.data’ with 3 columns and 10 rows, with the 3 previously created vectors

 – Create a 10 by 3 data frame ‘sqrt.ex.data’ that contains the square root of all the values in ‘ex.data’

 – Export ‘sqrt.ex.data’ as a .csv file.

 

Answer 1.1

vecA=c(2,7,5,2,7,4,7,4,78,62)
vecB=c(56,26,84,9,87,9,41,5,3,16)
vecAxB=vecA*vecB
ex.data=data.frame(vecA,vecB,vecAxB)
sqrt.ex.data=sqrt(ex.data)
write.csv(sqrt.ex.data,"exercise1.csv")

[collapse]

 

INTRODUCTION

Once upon a time…

DATA!

R allows you to handle all kind of data. Here a short description of what you can use and define.

THE BASICS OF THE BASICS

You got to start somewhere! What is R and how does it work? How can I get help?

MANAGING OUR DATA!

Learn how to view, export and import your data!