R is a free software environment for statistical analysis and graphics. It allows importing, cleaning, analyzing, and visualizing data. Key features include its ability to read various data formats, perform statistical analyses and modeling, and produce publication-quality graphs. R has a steep learning curve but is highly extensible and supports a wide range of statistical techniques through its packages. This document provides an introduction to obtaining and installing R, performing basic tasks like importing data and help functions, and using R for descriptive statistics, statistical modeling, and multivariate analyses.
This document introduces the R programming language. It covers obtaining and installing R, reading and exporting data, and performing basic statistical analyses and econometrics. R can be used for statistical analysis, modeling, and data visualization. It has a steep learning curve but is free, open source software with a strong user community and implements many advanced statistical methods.
Advanced Data Analytics with R Programming.pptAnshika865276
R is a software environment for statistical analysis and graphics. It allows users to import, clean, analyze, and visualize data. Key features include importing data from various sources, conducting descriptive statistics and statistical modeling, and creating publication-quality graphs. R has a steep learning curve but is highly extensible and supports a wide range of statistical techniques through its base functionality and contributed packages.
R is a language and environment for statistical computing and graphics. It contains a wide variety of statistical and graphical techniques built into its core. R code is executed from the R console by typing commands and pressing enter to see the output. Data can be imported from files like CSV, manipulated using functions, and exported for later use. Common tasks in R include importing data, subsetting datasets, sorting data, performing calculations and statistical analyses, and visualizing results.
This document provides an agenda for an R programming presentation. It includes an introduction to R, commonly used packages and datasets in R, basics of R like data structures and manipulation, looping concepts, data analysis techniques using dplyr and other packages, data visualization using ggplot2, and machine learning algorithms in R. Shortcuts for the R console and IDE are also listed.
R is an open source statistical programming language and software environment used widely for statistical analysis and graphics. This document provided an introduction to using R, including downloading and installing R, the basic R environment and interface, help resources, loading and using packages, reading data into R from files, and performing common descriptive statistics and linear regression modeling. Examples were provided using built-in and example datasets to demonstrate summarizing data, exploring variables, and fitting simple statistical models in R.
This document provides an introduction to R programming. It discusses that R is an open source programming language for statistical analysis and graphics. It is used widely in data science due to being free, having a strong user community, and having the ability to implement advanced statistical methods. The document then covers downloading and installing R, the basic R environment including the command window and scripts, basic programming objects like vectors and data frames, and how to import and work with datasets in R. It emphasizes that R has powerful but can be difficult to learn due to being command-driven without commercial support.
R is a free and open-source language and environment for statistical computing and graphics. It contains a variety of statistical and graphical techniques built in. This document provides an introduction to using R, including how to import and manage data, perform basic analyses and visualizations, and save scripts. It covers topics such as importing data from CSV and text files, creating and subsetting data frames, recoding variables, sorting and merging data, and using basic functions.
The document discusses various methods for reading data into R from different sources:
- CSV files can be read using read.csv()
- Excel files can be read using the readxl package
- SAS, Stata, and SPSS files can be imported using the haven package functions read_sas(), read_dta(), and read_sav() respectively
- SAS files with the .sas7bdat extension can also be read using the sas7bdat package
This document introduces the R programming language. It covers obtaining and installing R, reading and exporting data, and performing basic statistical analyses and econometrics. R can be used for statistical analysis, modeling, and data visualization. It has a steep learning curve but is free, open source software with a strong user community and implements many advanced statistical methods.
Advanced Data Analytics with R Programming.pptAnshika865276
R is a software environment for statistical analysis and graphics. It allows users to import, clean, analyze, and visualize data. Key features include importing data from various sources, conducting descriptive statistics and statistical modeling, and creating publication-quality graphs. R has a steep learning curve but is highly extensible and supports a wide range of statistical techniques through its base functionality and contributed packages.
R is a language and environment for statistical computing and graphics. It contains a wide variety of statistical and graphical techniques built into its core. R code is executed from the R console by typing commands and pressing enter to see the output. Data can be imported from files like CSV, manipulated using functions, and exported for later use. Common tasks in R include importing data, subsetting datasets, sorting data, performing calculations and statistical analyses, and visualizing results.
This document provides an agenda for an R programming presentation. It includes an introduction to R, commonly used packages and datasets in R, basics of R like data structures and manipulation, looping concepts, data analysis techniques using dplyr and other packages, data visualization using ggplot2, and machine learning algorithms in R. Shortcuts for the R console and IDE are also listed.
R is an open source statistical programming language and software environment used widely for statistical analysis and graphics. This document provided an introduction to using R, including downloading and installing R, the basic R environment and interface, help resources, loading and using packages, reading data into R from files, and performing common descriptive statistics and linear regression modeling. Examples were provided using built-in and example datasets to demonstrate summarizing data, exploring variables, and fitting simple statistical models in R.
This document provides an introduction to R programming. It discusses that R is an open source programming language for statistical analysis and graphics. It is used widely in data science due to being free, having a strong user community, and having the ability to implement advanced statistical methods. The document then covers downloading and installing R, the basic R environment including the command window and scripts, basic programming objects like vectors and data frames, and how to import and work with datasets in R. It emphasizes that R has powerful but can be difficult to learn due to being command-driven without commercial support.
R is a free and open-source language and environment for statistical computing and graphics. It contains a variety of statistical and graphical techniques built in. This document provides an introduction to using R, including how to import and manage data, perform basic analyses and visualizations, and save scripts. It covers topics such as importing data from CSV and text files, creating and subsetting data frames, recoding variables, sorting and merging data, and using basic functions.
The document discusses various methods for reading data into R from different sources:
- CSV files can be read using read.csv()
- Excel files can be read using the readxl package
- SAS, Stata, and SPSS files can be imported using the haven package functions read_sas(), read_dta(), and read_sav() respectively
- SAS files with the .sas7bdat extension can also be read using the sas7bdat package
R is a language and environment for statistical computing and graphics. It is based on S, an earlier language developed at Bell Labs. R features include being cross-platform, open source, having a package-based repository, strong graphics capabilities, and active user and developer communities. Useful URLs and books for learning R are provided. Instructions for installing R and RStudio on different platforms are given. R can be used for a wide range of statistical analyses and data visualization.
R is a language and environment for statistical computing and graphics. It includes facilities for data manipulation, calculation, graphical display, and programming. Some key features of R include effective data handling, a suite of operators for calculations on arrays and matrices, graphical facilities, and a programming language with conditionals, loops, and functions. Common data structures in R include vectors, matrices, factors, lists, and data frames. Basic operations include arithmetic, logical operations, indexing, subsetting, applying functions, binding, and coercing between different structures.
A short tutorial on R, basically for a starter who wants to do data mining especially text data mining.
Related codes and data will be found at the following lnik: http://textanalytics.in/wm/R%20tutorial%20(DATA2014).zip
This document provides an introduction to using the R programming language. It outlines the basic aims of learning R, including using R commands, understanding R data structures, reading and writing data, and some example commands. It also discusses key aspects of R like packages, help files, functions, vectors, data frames, and quitting R.
R is a free programming language and software environment for statistical analysis and graphics. It contains functions for data manipulation, calculation, and graphical displays. Some key features of R include being free, running on multiple platforms, and having extensive statistical and graphical capabilities. Common object types in R include vectors, matrices, data frames, and lists. R also has packages that add additional functions.
This document provides an introduction to using the R programming language. It outlines the basic components of R including commands, functions, data structures, reading and writing data, and quitting R. It also discusses installing R and the Bioconductor extension for genomic data analysis.
Best corporate-r-programming-training-in-mumbaiUnmesh Baile
Vibrant Technologies is headquarted in Mumbai,India.We are the best Teradata training provider in Navi Mumbai who provides Live Projects to students.We provide Corporate Training also.We are Best Teradata Database classes in Mumbai according to our students and corporates
Data Science, Statistical Analysis and R... Learn what those mean, how they can help you find answers to your questions and complement the existing toolsets and processes you are currently using to make sense of data. We will explore R and the RStudio development environment, installing and using R packages, basic and essential data structures and data types, plotting graphics, manipulating data frames and how to connect R and SQL Server.
This document provides an overview of the R programming language. It describes that R can handle numeric and textual data, perform matrix algebra and statistical functions. While R is not a database, it can connect to external databases. It also summarizes that R has no graphical user interface but can connect to other languages for visualization, and its interpreter can be slow but users can call optimized C/C++ code. The document also contrasts the differences between using R and commercial packages.
Introduction to R for Learning Analytics ResearchersVitomir Kovanovic
The slides from my 2hr tutorial organised at 2018 Learning Analytics Summer Institute (LASI) at Teachers College, Columbia University on June 11, 2018.
This document provides an overview of the R programming language and environment. It discusses why R is useful, outlines its interface and workspace, describes how to access help and tutorials, install packages, and input/output data. The interactive nature of R is highlighted, where results from one function can be used as input for another.
This document provides an introduction and overview to learning R. It covers installing R and RStudio, basic data types and structures like vectors, matrices and data frames. It also discusses importing data, viewing and manipulating data through functions like filtering, binding and transforming. Finally, it discusses creating summary tables from data, joining datasets, and creating visualizations and plots in R using packages like ggplot2. The goal is to learn the basics of working with data in R, performing basic analysis and creating charts.
This document provides a step-by-step guide to learning R. It begins with the basics of R, including downloading and installing R and R Studio, understanding the R environment and basic operations. It then covers R packages, vectors, data frames, scripts, and functions. The second section discusses data handling in R, including importing data from external files like CSV and SAS files, working with datasets, creating new variables, data manipulations, sorting, removing duplicates, and exporting data. The document is intended to guide users through the essential skills needed to work with data in R.
This document provides an overview of the basics of R. It discusses why R is useful, outlines its interface and workspace, describes how to get help and install packages, and explains some key concepts like objects, functions, and the search path. The document is intended to introduce new users to commonly used R functions and features to get started with the programming language.
This document provides an overview of the basics of R. It discusses why R is useful, outlines its interface and workspace, describes how to get help and install packages, and explains some key concepts like objects, functions, and the search path. The document is intended to introduce new users to commonly used R functions and features to get started with the programming language.
This document provides an overview of the basics of R including why R is used, tutorials and links for learning R, an overview of the R interface and workspace, and how to get help in R. It discusses that R is a free and open-source statistical programming language used for statistical analysis and graphics. It has a steep learning curve due to the interactive nature of analyzing data through chained commands rather than single procedures. Help is provided through a built-in system and various online tutorials.
Modeling in R Programming Language for Beginers.pptanshikagoel52
This document provides an overview of the basics of R. It discusses why R is useful, outlines its interface and workspace, describes how to get help and install packages, and explains some key concepts like objects, functions, and the search path. The document is intended to introduce new users to commonly used R functions and features to get started with the programming language.
R is a programming language and environment commonly used in statistical computing, data analytics and scientific research.
It is one of the most popular languages used by statisticians, data analysts, researchers and marketers to retrieve, clean, analyze, visualize and present data.
Due to its expressive syntax and easy-to-use interface, it has grown in popularity in recent years.
R is a programming language and environment for statistical analysis and graphics. It has many built-in statistical and graphical techniques. R can be installed from CRAN and runs on Windows, MacOS, and UNIX systems. The basic R interface is the console, but RStudio provides an integrated development environment. In RStudio, you can write scripts, see outputs and plots, and access help and packages. Packages extend R's functionality through additional functions and data. Common data types in R include numeric, integer, character, factor, and logical. Vectors are the basic data structure, but R also supports matrices, arrays, data frames and lists.
R is a language and environment for statistical computing and graphics. It is based on S, an earlier language developed at Bell Labs. R features include being cross-platform, open source, having a package-based repository, strong graphics capabilities, and active user and developer communities. Useful URLs and books for learning R are provided. Instructions for installing R and RStudio on different platforms are given. R can be used for a wide range of statistical analyses and data visualization.
R is a language and environment for statistical computing and graphics. It includes facilities for data manipulation, calculation, graphical display, and programming. Some key features of R include effective data handling, a suite of operators for calculations on arrays and matrices, graphical facilities, and a programming language with conditionals, loops, and functions. Common data structures in R include vectors, matrices, factors, lists, and data frames. Basic operations include arithmetic, logical operations, indexing, subsetting, applying functions, binding, and coercing between different structures.
A short tutorial on R, basically for a starter who wants to do data mining especially text data mining.
Related codes and data will be found at the following lnik: http://textanalytics.in/wm/R%20tutorial%20(DATA2014).zip
This document provides an introduction to using the R programming language. It outlines the basic aims of learning R, including using R commands, understanding R data structures, reading and writing data, and some example commands. It also discusses key aspects of R like packages, help files, functions, vectors, data frames, and quitting R.
R is a free programming language and software environment for statistical analysis and graphics. It contains functions for data manipulation, calculation, and graphical displays. Some key features of R include being free, running on multiple platforms, and having extensive statistical and graphical capabilities. Common object types in R include vectors, matrices, data frames, and lists. R also has packages that add additional functions.
This document provides an introduction to using the R programming language. It outlines the basic components of R including commands, functions, data structures, reading and writing data, and quitting R. It also discusses installing R and the Bioconductor extension for genomic data analysis.
Best corporate-r-programming-training-in-mumbaiUnmesh Baile
Vibrant Technologies is headquarted in Mumbai,India.We are the best Teradata training provider in Navi Mumbai who provides Live Projects to students.We provide Corporate Training also.We are Best Teradata Database classes in Mumbai according to our students and corporates
Data Science, Statistical Analysis and R... Learn what those mean, how they can help you find answers to your questions and complement the existing toolsets and processes you are currently using to make sense of data. We will explore R and the RStudio development environment, installing and using R packages, basic and essential data structures and data types, plotting graphics, manipulating data frames and how to connect R and SQL Server.
This document provides an overview of the R programming language. It describes that R can handle numeric and textual data, perform matrix algebra and statistical functions. While R is not a database, it can connect to external databases. It also summarizes that R has no graphical user interface but can connect to other languages for visualization, and its interpreter can be slow but users can call optimized C/C++ code. The document also contrasts the differences between using R and commercial packages.
Introduction to R for Learning Analytics ResearchersVitomir Kovanovic
The slides from my 2hr tutorial organised at 2018 Learning Analytics Summer Institute (LASI) at Teachers College, Columbia University on June 11, 2018.
This document provides an overview of the R programming language and environment. It discusses why R is useful, outlines its interface and workspace, describes how to access help and tutorials, install packages, and input/output data. The interactive nature of R is highlighted, where results from one function can be used as input for another.
This document provides an introduction and overview to learning R. It covers installing R and RStudio, basic data types and structures like vectors, matrices and data frames. It also discusses importing data, viewing and manipulating data through functions like filtering, binding and transforming. Finally, it discusses creating summary tables from data, joining datasets, and creating visualizations and plots in R using packages like ggplot2. The goal is to learn the basics of working with data in R, performing basic analysis and creating charts.
This document provides a step-by-step guide to learning R. It begins with the basics of R, including downloading and installing R and R Studio, understanding the R environment and basic operations. It then covers R packages, vectors, data frames, scripts, and functions. The second section discusses data handling in R, including importing data from external files like CSV and SAS files, working with datasets, creating new variables, data manipulations, sorting, removing duplicates, and exporting data. The document is intended to guide users through the essential skills needed to work with data in R.
This document provides an overview of the basics of R. It discusses why R is useful, outlines its interface and workspace, describes how to get help and install packages, and explains some key concepts like objects, functions, and the search path. The document is intended to introduce new users to commonly used R functions and features to get started with the programming language.
This document provides an overview of the basics of R. It discusses why R is useful, outlines its interface and workspace, describes how to get help and install packages, and explains some key concepts like objects, functions, and the search path. The document is intended to introduce new users to commonly used R functions and features to get started with the programming language.
This document provides an overview of the basics of R including why R is used, tutorials and links for learning R, an overview of the R interface and workspace, and how to get help in R. It discusses that R is a free and open-source statistical programming language used for statistical analysis and graphics. It has a steep learning curve due to the interactive nature of analyzing data through chained commands rather than single procedures. Help is provided through a built-in system and various online tutorials.
Modeling in R Programming Language for Beginers.pptanshikagoel52
This document provides an overview of the basics of R. It discusses why R is useful, outlines its interface and workspace, describes how to get help and install packages, and explains some key concepts like objects, functions, and the search path. The document is intended to introduce new users to commonly used R functions and features to get started with the programming language.
R is a programming language and environment commonly used in statistical computing, data analytics and scientific research.
It is one of the most popular languages used by statisticians, data analysts, researchers and marketers to retrieve, clean, analyze, visualize and present data.
Due to its expressive syntax and easy-to-use interface, it has grown in popularity in recent years.
R is a programming language and environment for statistical analysis and graphics. It has many built-in statistical and graphical techniques. R can be installed from CRAN and runs on Windows, MacOS, and UNIX systems. The basic R interface is the console, but RStudio provides an integrated development environment. In RStudio, you can write scripts, see outputs and plots, and access help and packages. Packages extend R's functionality through additional functions and data. Common data types in R include numeric, integer, character, factor, and logical. Vectors are the basic data structure, but R also supports matrices, arrays, data frames and lists.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
How to Manage Your Lost Opportunities in Odoo 17 CRMCeline George
Odoo 17 CRM allows us to track why we lose sales opportunities with "Lost Reasons." This helps analyze our sales process and identify areas for improvement. Here's how to configure lost reasons in Odoo 17 CRM
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
17641.ppt
1. Introduction to R
Arin Basu MD MPH
DataAnalytics
dataanalytics@rediffmail.com
http://dataanalytics.objectis.net
2. We’ll Cover
• What is R
• How to obtain and install R
• How to read and export data
• How to do basic statistical analyses
• Econometric packages in R
3. What is R
• Software for Statistical Data Analysis
• Based on S
• Programming Environment
• Interpreted Language
• Data Storage, Analysis, Graphing
• Free and Open Source Software
4. Obtaining R
• Current Version: R-2.0.0
• Comprehensive R Archive Network:
http://cran.r-project.org
• Binary source codes
• Windows executables
• Compiled RPMs for Linux
• Can be obtained on a CD
5. Installing R
• Binary (Windows/Linux): One step process
– exe, rpm (Red Hat/Mandrake), apt-get (Debian)
• Linux, from sources:
$ tar –zxvf “filename.tar.gz”
$ cd filename
$ ./configure
$ make
$ make check
$ make install
7. Strengths and Weaknesses
• Strengths
– Free and Open Source
– Strong User Community
– Highly extensible, flexible
– Implementation of high end statistical methods
– Flexible graphics and intelligent defaults
• Weakness
– Steep learning curve
– Slow for large datasets
8. Basics
• Highly Functional
– Everything done through functions
– Strict named arguments
– Abbreviations in arguments OK
(e.g. T for TRUE)
• Object Oriented
– Everything is an object
– “<-” is an assignment operator
– “X <- 5”: X GETS the value 5
9. Getting Help in R
• From Documentation:
– ?WhatIWantToKnow
– help(“WhatIWantToKnow”)
– help.search(“WhatIWantToKnow”)
– help.start()
– getAnywhere(“WhatIWantToKnow”)
– example(“WhatIWantToKnow”)
• Documents: “Introduction to R”
• Active Mailing List
– Archives
– Directly Asking Questions on the List
10. Data Structures
• Supports virtually any type of data
• Numbers, characters, logicals (TRUE/ FALSE)
• Arrays of virtually unlimited sizes
• Simplest: Vectors and Matrices
• Lists: Can Contain mixed type variables
• Data Frame: Rectangular Data Set
11. Data Structure in R
Linear Rectangular
All Same Type VECTORS MATRIX*
Mixed LIST DATA FRAME
12. Running R
• Directly in the Windowing System
(Console)
• Using Editors
– Notepad, WinEdt, Tinn-R: Windows
– Xemacs, ESS (Emacs speaks Statistics)
• On the Editor:
–source(“filename.R”)
– Outputs can be diverted by using
• sink(“filename.Rout”)
13. R Working Area
This is the area where all
commands are issued, and
non-graphical outputs
observed when run
interactively
14. In an R Session…
• First, read data from other sources
• Use packages, libraries, and functions
• Write functions wherever necessary
• Conduct Statistical Data Analysis
• Save outputs to files, write tables
• Save R workspace if necessary (exit prompt)
15. Specific Tasks
• To see which directories and data are loaded,
type: search()
• To see which objects are stored, type: ls()
• To include a dataset in the searchpath for
analysis, type:
attach(NameOfTheDataset,
expression)
• To detach a dataset from the searchpath after
analysis, type:
detach(NameOfTheDataset)
16. Reading data into R
• R not well suited for data preprocessing
• Preprocess data elsewhere (SPSS, etc…)
• Easiest form of data to input: text file
• Spreadsheet like data:
– Small/medium size: use read.table()
– Large data: use scan()
• Read from other systems:
– Use the library “foreign”: library(foreign)
– Can import from SAS, SPSS, Epi Info
– Can export to STATA
17. Reading Data: summary
• Directly using a vector e.g.: x <- c(1,2,3…)
• Using scan and read.table function
• Using matrix function to read data matrices
• Using data.frame to read mixed data
• library(foreign) for data from other programs
18. Accessing Variables
• edit(<mydataobject>)
• Subscripts essential tools
– x[1] identifies first element in vector x
– y[1,] identifies first row in matrix y
– y[,1] identifies first column in matrix y
• $ sign for lists and data frames
– myframe$age gets age variable of myframe
– attach(dataframe) -> extract by variable name
19. Subset Data
• Using subset function
– subset() will subset the dataframe
• Subscripting from data frames
– myframe[,1] gives first column of myframe
• Specifying a vector
– myframe[1:5] gives first 5 rows of data
• Using logical expressions
– myframe[myframe[,1], < 5,] gets all rows of the
first column that contain values less than 5
20. Graphics
• Plot an object, like: plot(num.vec)
– here plots against index numbers
• Plot sends to graphic devices
– can specify which graphic device you want
• postscript, gif, jpeg, etc…
• you can turn them on and off, like: dev.off()
• Two types of plotting
– high level: graphs drawn with one call
– Low Level: add additional information to
existing graph
23. Programming in R
• Functions & Operators typically work on
entire vectors
• Expressions surrounded by {}
• Codes separated by newlines, “;” not
necessary
• You can write your own functions and use
them
24. Statistical Functions in R
• Descriptive Statistics
• Statistical Modeling
– Regressions: Linear and Logistic
– Probit, Tobit Models
– Time Series
• Multivariate Functions
• Inbuilt Packages, contributed packages
25. Descriptive Statistics
• Has functions for all common statistics
• summary() gives lowest, mean, median,
first, third quartiles, highest for numeric
variables
• stem() gives stem-leaf plots
• table() gives tabulation of categorical
variables
26. Statistical Modeling
• Over 400 functions
– lm, glm, aov, ts
• Numerous libraries & packages
– survival, coxph, tree (recursive trees), nls, …
• Distinction between factors and regressors
– factors: categorical, regressors: continuous
– you must specify factors unless they are obvious
to R
– dummy variables for factors created automatically
• Use of data.frame makes life easy
27. How to model
• Specify your model like this:
– y ~ xi+ci, where
– y = outcome variable, xi = main explanatory
variables, ci = covariates, + = add terms
– Operators have special meanings
• + = add terms, : = interactions, / = nesting, so on…
• Modeling -- object oriented
– each modeling procedure produces objects
– classes and functions for each object
28. Synopsis of Operators
nesting only
no specific
%in%
limiting interaction depths
exponentiation
^
interaction only
sequence
:
main effect and nesting
division
/
main effect and interactions
multiplication
*
add or remove terms
add or subtract
+ or -
In Formula means
Usually means
Operator
29. Modeling Example: Regression
carReg <- lm(speed~dist, data=cars)
carReg = becomes an object
to get summary of this regression, we type
summary(carReg)
to get only coefficients, we type
coef(carReg), or carReg$coef
don’t want intercept? add 0, so
carReg <- lm(speed~0+dist, data=cars)
30. Multivariate Techniques
• Several Libraries available
– mva, hmisc, glm,
– MASS: discriminant analysis and multidim
scaling
• Econometrics packages
– dse (multivariate time series, state-space
models), ineq: for measuring inequality, poverty
estimation, its: for irregular time series, sem:
structural equation modeling, and so on…
[http://www.mayin.org/ajayshah/]
31. Summarizing…
• Effective data handling and storage
• large, coherent set of tools for data analysis
• Good graphical facilities and display
– on screen
– on paper
• well-developed, simple, effective programming
32. For more resources, check out…
R home page
http://www.r-project.org
R discussion group
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Search Google for R and Statistics