SlideShare une entreprise Scribd logo
1  sur  12
Interfacing R with Other Software
Arindam Basu MBBS MPH PhD
School of Health Sciences,
University of Canterbury
arin.basu@gmail.com
This is R in RStudio
This is Stata
They Do Not Easily Speak …
Questions …
• Why Not?
• Is there a Need to Let them Speak with Each
Other?
• Can I work entirely in R while keeping my data
in Stata/Spss?
• Can I work entirely in Stata while coding in R?
Why do I need to Integrate?
• I like R; my colleague likes X
• Combine the flexibility and features of both
software …
• Others?
• Demonstrate R
Calling Stata Data into R
• Use “foreign” package
Calling R into SPSS
• Install R plug-in from
– http://www.ibm.com/developerworks/spssdevcen
tral
• You can use SPSS GUI following installation, or
use SPSS syntax to get your work done
SPSS Syntax to Call R in SPSS
Running R from Within Stata
• Use the “File” command to create the file to
write R code
• Invoke a shell using “shell” command within
Stata
• In Mac, OK to write “R”
• In Windows, Use the /Path/to/R.exe
Talking Points
• It is relatively easy to use R flexibly with other
software such as Stata and SPSS
• Similar routines exist for SAS, JMP, and Statistica
• The Package “Foreign” is very useful, but for large
data sets, consider “memisc” package
• With Other software, in most cases with R
installed, invoking shell is effective
• For More information, see
http://r4stats.com/articles/calling-r/

Contenu connexe

En vedette

Idea Lsept07
Idea Lsept07Idea Lsept07
Idea Lsept07griggans
 
Il metacrawler di SBBL
Il metacrawler di SBBLIl metacrawler di SBBL
Il metacrawler di SBBLbibliobioing
 
Stripper masculino
Stripper masculinoStripper masculino
Stripper masculinoascen
 
World Maths Day
World Maths DayWorld Maths Day
World Maths DayOllie Bray
 
MGS Number Day Posters
MGS Number Day PostersMGS Number Day Posters
MGS Number Day PostersOllie Bray
 
Netvibes juhend algajale
Netvibes juhend algajaleNetvibes juhend algajale
Netvibes juhend algajaleKai Pata
 
A learning shop for thurrock
A learning shop for thurrockA learning shop for thurrock
A learning shop for thurrock07733thurrock
 
cuerpos pintados
cuerpos pintadoscuerpos pintados
cuerpos pintadoscucoalmeria
 
Yorkshire Dales Fieldtrip March 07
Yorkshire Dales Fieldtrip March 07Yorkshire Dales Fieldtrip March 07
Yorkshire Dales Fieldtrip March 07ValVannet
 
Engage kick off_sept2012
Engage kick off_sept2012Engage kick off_sept2012
Engage kick off_sept2012Marc Duchesne
 
Unit 2 - Enlightenment
Unit 2 - EnlightenmentUnit 2 - Enlightenment
Unit 2 - Enlightenmentoutsidethecave
 
Hunt'n and Fish'n Club
Hunt'n and Fish'n ClubHunt'n and Fish'n Club
Hunt'n and Fish'n ClubCarol Case
 
Informatology: using web 2.0 in face-to-face sessions
Informatology: using web 2.0 in face-to-face sessionsInformatology: using web 2.0 in face-to-face sessions
Informatology: using web 2.0 in face-to-face sessionsscottw
 
Interaktiivne mälu taaskasutamine muuseumis
Interaktiivne mälu taaskasutamine muuseumisInteraktiivne mälu taaskasutamine muuseumis
Interaktiivne mälu taaskasutamine muuseumisKai Pata
 

En vedette (20)

Idea Lsept07
Idea Lsept07Idea Lsept07
Idea Lsept07
 
Comunicacion
ComunicacionComunicacion
Comunicacion
 
test
testtest
test
 
Il metacrawler di SBBL
Il metacrawler di SBBLIl metacrawler di SBBL
Il metacrawler di SBBL
 
Stripper masculino
Stripper masculinoStripper masculino
Stripper masculino
 
World Maths Day
World Maths DayWorld Maths Day
World Maths Day
 
Michaelf
MichaelfMichaelf
Michaelf
 
SimSchool@UC
SimSchool@UCSimSchool@UC
SimSchool@UC
 
MGS Number Day Posters
MGS Number Day PostersMGS Number Day Posters
MGS Number Day Posters
 
Kumamoto
KumamotoKumamoto
Kumamoto
 
Netvibes juhend algajale
Netvibes juhend algajaleNetvibes juhend algajale
Netvibes juhend algajale
 
Pace presentation
Pace presentationPace presentation
Pace presentation
 
A learning shop for thurrock
A learning shop for thurrockA learning shop for thurrock
A learning shop for thurrock
 
cuerpos pintados
cuerpos pintadoscuerpos pintados
cuerpos pintados
 
Yorkshire Dales Fieldtrip March 07
Yorkshire Dales Fieldtrip March 07Yorkshire Dales Fieldtrip March 07
Yorkshire Dales Fieldtrip March 07
 
Engage kick off_sept2012
Engage kick off_sept2012Engage kick off_sept2012
Engage kick off_sept2012
 
Unit 2 - Enlightenment
Unit 2 - EnlightenmentUnit 2 - Enlightenment
Unit 2 - Enlightenment
 
Hunt'n and Fish'n Club
Hunt'n and Fish'n ClubHunt'n and Fish'n Club
Hunt'n and Fish'n Club
 
Informatology: using web 2.0 in face-to-face sessions
Informatology: using web 2.0 in face-to-face sessionsInformatology: using web 2.0 in face-to-face sessions
Informatology: using web 2.0 in face-to-face sessions
 
Interaktiivne mälu taaskasutamine muuseumis
Interaktiivne mälu taaskasutamine muuseumisInteraktiivne mälu taaskasutamine muuseumis
Interaktiivne mälu taaskasutamine muuseumis
 

Plus de Dr Arindam Basu

Arsenic and bladder cancer variation in estimates
Arsenic and bladder cancer  variation in estimatesArsenic and bladder cancer  variation in estimates
Arsenic and bladder cancer variation in estimatesDr Arindam Basu
 
Development of polygenic risk scores for ambulatory care sensitive hospitalis...
Development of polygenic risk scores for ambulatory care sensitive hospitalis...Development of polygenic risk scores for ambulatory care sensitive hospitalis...
Development of polygenic risk scores for ambulatory care sensitive hospitalis...Dr Arindam Basu
 
Arsenic and bladder cancer variation in estimates
Arsenic and bladder cancer  variation in estimatesArsenic and bladder cancer  variation in estimates
Arsenic and bladder cancer variation in estimatesDr Arindam Basu
 
Arsenic and bladder cancer variation in estimates
Arsenic and bladder cancer  variation in estimatesArsenic and bladder cancer  variation in estimates
Arsenic and bladder cancer variation in estimatesDr Arindam Basu
 
Research Methods in Health Sciences
Research Methods in Health SciencesResearch Methods in Health Sciences
Research Methods in Health SciencesDr Arindam Basu
 
The Ibis Effect: The Migrant Indian Health Effect
The Ibis Effect: The Migrant Indian Health EffectThe Ibis Effect: The Migrant Indian Health Effect
The Ibis Effect: The Migrant Indian Health EffectDr Arindam Basu
 
A Lecture on Sample Size and Statistical Inference for Health Researchers
A Lecture on Sample Size and Statistical Inference for Health ResearchersA Lecture on Sample Size and Statistical Inference for Health Researchers
A Lecture on Sample Size and Statistical Inference for Health ResearchersDr Arindam Basu
 
Access to Health Care and Andersen Model
Access to Health Care and Andersen ModelAccess to Health Care and Andersen Model
Access to Health Care and Andersen ModelDr Arindam Basu
 
Understanding indian health culture
Understanding indian health cultureUnderstanding indian health culture
Understanding indian health cultureDr Arindam Basu
 
Priority Setting in Health Care
Priority Setting in Health CarePriority Setting in Health Care
Priority Setting in Health CareDr Arindam Basu
 
Social determinants-health
Social determinants-healthSocial determinants-health
Social determinants-healthDr Arindam Basu
 
Introduction to DALY and burden of disease
Introduction to DALY and burden of diseaseIntroduction to DALY and burden of disease
Introduction to DALY and burden of diseaseDr Arindam Basu
 
Using Visual Methods and Social Network Analysis to Explore Relationships in ...
Using Visual Methods and Social Network Analysis to Explore Relationships in ...Using Visual Methods and Social Network Analysis to Explore Relationships in ...
Using Visual Methods and Social Network Analysis to Explore Relationships in ...Dr Arindam Basu
 
Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)
Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)
Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)Dr Arindam Basu
 

Plus de Dr Arindam Basu (20)

Arsenic and bladder cancer variation in estimates
Arsenic and bladder cancer  variation in estimatesArsenic and bladder cancer  variation in estimates
Arsenic and bladder cancer variation in estimates
 
Development of polygenic risk scores for ambulatory care sensitive hospitalis...
Development of polygenic risk scores for ambulatory care sensitive hospitalis...Development of polygenic risk scores for ambulatory care sensitive hospitalis...
Development of polygenic risk scores for ambulatory care sensitive hospitalis...
 
Auckland 2018
Auckland 2018Auckland 2018
Auckland 2018
 
Arsenic and bladder cancer variation in estimates
Arsenic and bladder cancer  variation in estimatesArsenic and bladder cancer  variation in estimates
Arsenic and bladder cancer variation in estimates
 
Arsenic and bladder cancer variation in estimates
Arsenic and bladder cancer  variation in estimatesArsenic and bladder cancer  variation in estimates
Arsenic and bladder cancer variation in estimates
 
Research Methods in Health Sciences
Research Methods in Health SciencesResearch Methods in Health Sciences
Research Methods in Health Sciences
 
Overleaf presentation
Overleaf presentationOverleaf presentation
Overleaf presentation
 
Mixed methods research
Mixed methods researchMixed methods research
Mixed methods research
 
The Ibis Effect: The Migrant Indian Health Effect
The Ibis Effect: The Migrant Indian Health EffectThe Ibis Effect: The Migrant Indian Health Effect
The Ibis Effect: The Migrant Indian Health Effect
 
A Lecture on Sample Size and Statistical Inference for Health Researchers
A Lecture on Sample Size and Statistical Inference for Health ResearchersA Lecture on Sample Size and Statistical Inference for Health Researchers
A Lecture on Sample Size and Statistical Inference for Health Researchers
 
Access to Health Care and Andersen Model
Access to Health Care and Andersen ModelAccess to Health Care and Andersen Model
Access to Health Care and Andersen Model
 
Understanding indian health culture
Understanding indian health cultureUnderstanding indian health culture
Understanding indian health culture
 
Albinism
AlbinismAlbinism
Albinism
 
Priority Setting in Health Care
Priority Setting in Health CarePriority Setting in Health Care
Priority Setting in Health Care
 
Social determinants-health
Social determinants-healthSocial determinants-health
Social determinants-health
 
Introduction to DALY and burden of disease
Introduction to DALY and burden of diseaseIntroduction to DALY and burden of disease
Introduction to DALY and burden of disease
 
Mixed Methods research
Mixed Methods researchMixed Methods research
Mixed Methods research
 
India health-systems
India health-systemsIndia health-systems
India health-systems
 
Using Visual Methods and Social Network Analysis to Explore Relationships in ...
Using Visual Methods and Social Network Analysis to Explore Relationships in ...Using Visual Methods and Social Network Analysis to Explore Relationships in ...
Using Visual Methods and Social Network Analysis to Explore Relationships in ...
 
Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)
Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)
Presentation on UDHC for UC Tertiary Engagement Summit (Draft Slides)
 

Dernier

Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Boston Institute of Analytics
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Boston Institute of Analytics
 
World Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdf
World Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdfWorld Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdf
World Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdfsimulationsindia
 
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024Susanna-Assunta Sansone
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...Amil Baba Dawood bangali
 
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelDecoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelBoston Institute of Analytics
 
Rithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdfRithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdfrahulyadav957181
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max PrincetonTimothy Spann
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBoston Institute of Analytics
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
What To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxWhat To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxSimranPal17
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Thomas Poetter
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxaleedritatuxx
 
IBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaIBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaManalVerma4
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxHaritikaChhatwal1
 
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...Jack Cole
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 

Dernier (20)

Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
 
World Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdf
World Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdfWorld Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdf
World Economic Forum Metaverse Ecosystem By Utpal Chakraborty.pdf
 
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
FAIR, FAIRsharing, FAIR Cookbook and ELIXIR - Sansone SA - Boston 2024
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
 
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis modelDecoding Movie Sentiments: Analyzing Reviews with Data Analysis model
Decoding Movie Sentiments: Analyzing Reviews with Data Analysis model
 
Rithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdfRithik Kumar Singh codealpha pythohn.pdf
Rithik Kumar Singh codealpha pythohn.pdf
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max Princeton
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
What To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptxWhat To Do For World Nature Conservation Day by Slidesgo.pptx
What To Do For World Nature Conservation Day by Slidesgo.pptx
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Insurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis ProjectInsurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis Project
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
 
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptxmodul pembelajaran robotic Workshop _ by Slidesgo.pptx
modul pembelajaran robotic Workshop _ by Slidesgo.pptx
 
IBEF report on the Insurance market in India
IBEF report on the Insurance market in IndiaIBEF report on the Insurance market in India
IBEF report on the Insurance market in India
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptx
 
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
why-transparency-and-traceability-are-essential-for-sustainable-supply-chains...
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 

How to Use R with Other Statistical Software

  • 1. Interfacing R with Other Software Arindam Basu MBBS MPH PhD School of Health Sciences, University of Canterbury arin.basu@gmail.com
  • 2. This is R in RStudio
  • 4. They Do Not Easily Speak …
  • 5. Questions … • Why Not? • Is there a Need to Let them Speak with Each Other? • Can I work entirely in R while keeping my data in Stata/Spss? • Can I work entirely in Stata while coding in R?
  • 6. Why do I need to Integrate? • I like R; my colleague likes X • Combine the flexibility and features of both software … • Others? • Demonstrate R
  • 7. Calling Stata Data into R • Use “foreign” package
  • 8. Calling R into SPSS • Install R plug-in from – http://www.ibm.com/developerworks/spssdevcen tral • You can use SPSS GUI following installation, or use SPSS syntax to get your work done
  • 9. SPSS Syntax to Call R in SPSS
  • 10. Running R from Within Stata • Use the “File” command to create the file to write R code • Invoke a shell using “shell” command within Stata • In Mac, OK to write “R” • In Windows, Use the /Path/to/R.exe
  • 11.
  • 12. Talking Points • It is relatively easy to use R flexibly with other software such as Stata and SPSS • Similar routines exist for SAS, JMP, and Statistica • The Package “Foreign” is very useful, but for large data sets, consider “memisc” package • With Other software, in most cases with R installed, invoking shell is effective • For More information, see http://r4stats.com/articles/calling-r/