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 #1

Updated by Understanding Society User Support Team over 1 year 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

Actions #2

Updated by Understanding Society User Support Team about 1 year ago

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

Also available in: Atom PDF