Organize .dta file to upload in RStudio

Hello,

I'm having some trouble with uploading data from a .dta file in R.
I'm looking at morphological changes in the shape of the triquetrum of different primates. I finished placing landmarks with Landmark Editor, and I saved the data as a .dta file.
Now, I want to upload this file to R for analysis.
However, I'm having difficulties doing that. I don't know how I should 'organize' this file properly to be able to do analysis. When I upload the file using "import dataset --> from text (readr)", the data seems unorganized ...

Thanks you very much for your help!

Marie.

Hi Marie,
Haven't worked a lot with .dta file. But this approach below might help you get the data in.

# input Stata file
library(foreign)
mydata <- read.dta("c:/mydata.dta")
1 Like

Thank you for your reply, but I already tried that.
This gives me the error "not a Stata version 5-12 .dta file".
And google isn't helping on solving this error ...

Hi Marie,

Is it possible for you to share a sample of your data?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.