Comments (3)
Please re-open if you can provide a reproducible example.
from haven.
Hi, sorry for not doing this earlier, I thought it'd be difficult and I couldn't share the original dataset. However, the error shows even using a two variable subset. It works using cars
though.
I attached links to the data in rdata and sav format. Nothing odd about it as far as I can tell (and it's easy to examine the whole dataset). The data displays normally in SPSS v20 and does not look constant at all, but I cannot run a bivariate correlation between the two variables.
If I take only the first 50 rows, it works, if I take the first 200 of 209 it doesn't. I guess this explains why it works using cars, which has only 50 rows.
library(haven)
load("test.rda")
write_sav(example, path = "test.sav")
https://dl.dropboxusercontent.com/u/1078620/test.rda
https://dl.dropboxusercontent.com/u/1078620/test.sav
from haven.
I'm sorry, didn't notice this before. It's about missings. There's some missings on row 146, and that's what causes it. Changing the missings to some other value fixes it. After I changed them to a number, I can set them missing again and it still works.
from haven.
Related Issues (20)
- New feature proposal: Reads creation/modified time of SAS7BDAT HOT 3
- Unable to allocate memory when opening a dta file HOT 1
- Upkeep for haven (2023)
- Use standard argument checkers
- `write_dta()` can error if labelled values are large enough
- Zero-length label worse than null label
- Remind the novice user of labelled-format? HOT 2
- Dates in labelled_spss HOT 3
- Release haven 2.5.4
- Allow `labels` to be passed through to `labelled()` as unnamed vector of same length as `x`
- Dataset label truncated after `write_xpt` HOT 5
- `read_xpt()` fails on misconstructed dates HOT 3
- typo in docs for as_factor
- read_sav default is to NOT encode user defined data
- `haven::read_sas` generates some message
- How to solve non-ascii output for `write_xpt` HOT 1
- write_sav is acting inconsistently for long string variables. HOT 1
- using `haven::write_xpt` to write a data frame with one column ignores empty rows at the bottom
- Unable to write tagged NA in SAS format
- Incorrect v8 xpt files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haven.