[R] All anchored series from a vector?
Johannes Graumann
johannes_graumann at web.de
Tue Dec 18 23:47:05 CET 2007
Should have been:
> myvector <- c("A","B","C","D","E")
> myseries <- miracle(myvector)
> myseries
> [1]
> [[1]] "A"
> [2]
> [[1]] "A" "B"
> [3]
> [[1]] "A" "B" "C"
> [4]
> [[1]] "A" "B" "C" "D"
> [5]
> [[1]] "A" "B" "C" "D" "E"
Sorry, Joh
Johannes Graumann wrote:
> Hi all,
>
> What may be a smart, efficient way to get the following result:
>
> myvector <- c("A","B","C","D","E")
> myseries <- miracle(myvector)
> myseries
> [1]
> [[1]] "A"
> [2]
> [[1]] "A" "B"
> [3]
> [[1]] "A" "B"
> [4]
> [[1]] "A" "B" "C"
> [5]
> [[1]] "A" "B" "C" "D"
> [6]
> [[1]] "A" "B" "C" "D" "E"
>
> Thanks for any hints,
>
> Joh
>
> ______________________________________________
> 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