[R] macro function

Petr PIKAL petr.pikal at precheza.cz
Tue Feb 28 16:27:16 CET 2012


Hi

Your mail is quite messy. what is ***? How your data are structured?

str(your.data)

Please submit part of your data by

dput(your.data)

and show what the output shall be.

Regards
Petr

> 
> Actually, what I really want to do is that,
> 
>  
> <<"annual productivity data(2011)">>
> 
>        firts date                  2011-01-01                 2011-01-02 
 
> 2011-01-03                  2011-01-04                  2011-01-05 * *
> *
> A    2011-02-03                       0  
> 0                                     0  
> 0                                      0             * * *
> B    2011-01-02                       0  
> 10                                   11  
> 12 
> 13            * * *
> C    2011-04-02                       0  
> 0 
> 11                                   12  
> 13 
> * * *
> D    2011-02-02                       0  
> 0                                     0  
> 0                                      0               * * *
> E    2011-11-02                        0  
> 0                                     0  
> 0                                      0              * * *
>         *
>         *
>         *
> 
> I have this "annual productivity data(2011)" and I need to convert this 
as
> "D-Day data". That is to say,  I need this form.
> 
>      firts date                       D-DAY D+1 
> D+2                                  D+3 D+4 
> * * *
> A   2011-02-03                       0  
> 0 
> 0                                     0  
> 0             * * *
> B   2011-01-02                       0  
> 10 
> 11                                   12  
> 13 
> * * *
> C   2011-04-02                       0  
> 0 
> 11                                   12  
> 13 
> * * *
> D   2011-02-02                       0  
> 0 
> 0                                     0  
> 0               * * *
> E   2011-11-02                        0  
> 0                                     0  
> 0                                      0              * * *
> 
>         *
>         *
>         *
> 
> D-day is the "first date" and each cells are day-productivity of the 
day.
> 
> how can I make a code for that?
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/macro-
> function-tp4427385p4428131.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list