SlideShare uma empresa Scribd logo
1 de 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/

Mais conteúdo relacionado

Destaque

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
 

Destaque (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
 

Mais 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
 

Mais 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)
 

Último

VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 

Último (20)

VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 

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/