Project

General

Profile

Actions

Support #1925

open

Importing data to R - converting from wide to long error

Added by Matthew Clark over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
Data documentation
Start date:
06/20/2023
% Done:

100%


Description

I've been trying to read in data (a stata file) in R, tidy and convert from wide to long format using the code shared below:

https://www.understandingsociety.ac.uk/sites/default/files/downloads/documentation/mainstage/syntax/r/r-merging-indresp-hhresp-all-waves-long-format.R

However I keep getting an error when trying to convert from wide to long (Error in 'vec_cast.haven_labelled.haven_labelled()': Can't convert from 'value' <labelled<double>> to <labelled<double>> due to loss of precision) - see attached screenshot.

Has anyone come across this issue before? Does anyone know a solution?

Matt


Files

Actions

Also available in: Atom PDF