Issue with to_long_format()
See original GitHub issueI have a dataset which looks like this:
transforming it into the long format with to_long_format(data, duration_col='time2')
produces this:
Note how the start column has zeros. Either there is an issue here or I misunderstood how this function works.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Issues reshaping data.frame from wide to long format
I'm trying to reshape the below data frame into a long format, but I'm not having much luck writing the code using reshape()...
Read more >long_format: Convert to long format in JackEdTaylor/LexOPS
Converts the generated stimuli from the generate() function into long format. Usage. long_format(df, include = "design", include_candids = FALSE) ...
Read more >dynamicTicks = TRUE for categorical axis · Issue #860 - GitHub
It seems that dynamicTicks=TRUE in ggplotly is working for categorical data only when the plot is not faceted. Is there a reason for...
Read more >15 Easy Solutions To Your Data Frame Problems In R
Discover how to create a data frame in R, change column and row names, access values, attach data frames, apply functions and much...
Read more >Efficient reshaping using data.tables
- Convert DT to long form where each dob is a separate observation. We could accomplish this using melt() by specifying id.vars and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re right, this is confusing. The purpose of
to_long_format
needs to be expanded, gimme a few hours to make this better.OK, my case can be covered like this:
The example you have mentioned above can be solved using these steps:
But you need to check this. For instance, I have assumed that the time in
df
cannot be lower than the one incv
. Also, proper sorting needs to be done in casecv
is given unsorted.