Dear R-helper,

 

I wonder if anyone can help me. I am trying to convert a dataset to a
format recognizable by a software onboard a research vessel but I am
having problems with some steps.

 

I have a data frame as follows:

 

Conc             Lat       Lon    Depth

Point0000   56.25    -5.65      70

Point0001   56.55    -5.35      85

Point0002   56.25    -5.65      65

Point0003   56.37    -5.21      80

Point0004   56.45    -5.23      30

Point0000   56.25    -5.55      75

Point0001   56.35    -5.34      85

Point0002   56.28    -5.18      75

Point0003   56.25    -5.10      45

Point0000   56.55    -5.65      50

...

 

My question is: how can I insert an empty row and the text below just
before every "Point0000" of the column Conc? 

 

Object=Line

Color RED

Style SOLID  

 

 

The result I expect is as follows:

 

Object=Line

Color RED

Style SOLID  

Point0000   56.25    -5.65      70

Point0001   56.55    -5.35      85

Point0002   56.25    -5.65      65

Point0003   56.37    -5.21      80

Point0004   56.45    -5.23      30

 

Object=Line

Color RED

Style SOLID  

Point0000   56.25    -5.55      75

Point0001   56.35    -5.34      85

Point0002   56.28    -5.18      75

Point0003   56.25    -5.10      45

 

Object=Line

Color RED

Style SOLID  

Point0000   56.55    -5.65      50

 

 

Thank you very much for your help.

 

Best regards,

Mafalda


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to