Project

General

Profile

Support #1925

Importing data to R - converting from wide to long error

Added by Matthew Clark 10 months ago. Updated 5 months 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

#1

Updated by Understanding Society User Support Team 10 months ago

  • Category set to Data documentation
  • Status changed from New to Feedback
  • % Done changed from 0 to 90
  • Private changed from Yes to No

Dear Matthew,

This is a user deposited file, I am afraid we do not provide assistance for these files. Please contact Dr. David Bartram (University of Leicester) at who deposited the file.

Best wishes,
UKHLS User Support Team

#2

Updated by Understanding Society User Support Team 5 months ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100

Also available in: Atom PDF