Package suggestion

Hello !I have a big file containing a number of spots, a positition and a set of coordinates.

no	pos/neg	cordinates
1	+	  1   3
2	+         5    8
3      -         10   12

What I want to do is first to convert the length of intervals to point ( 1-3 -> to 1 2 3 )
next in a new column for each time that I have (+) to add 1, -1 when I have (-) and zero 0 when I am outside of the coordinate and in another column to have the sum of the second column as the table below

> 1 1 1
> 2 1 2
> 3 1 3
> 4 0 3
> 5 1 4
> 6 1 5
> 7 1 6
> 8 1  7
> 9 0  7
> 10 -1	-6
> 11 -1	-5
> 12 -1	-4

Is it any package to do this or any idea how can I generate this table?
Thanks in advance

Hi, could you take a look at the FAQ: What's a reproducible example (`reprex`) and how do I do one? and try a reprex. You can expect more and better answers with an explicit starting point.

One option is to take your object and apply

dput(my_data)

and cut and paste into your answer. There's no need for the complete file, just a few or several representative records.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.