@@ -99,7 +99,7 @@ calculate.outputrows <- function(DAT_mat, stepsize) {
9999
100100# ' @title Calculate the sequence of dating steps
101101# '
102- # ' @description approximation :( also i dont want to write documentation
102+ # ' @description TO DO also i dont want to write documentation
103103# '
104104# ' @param datmin todo
105105# ' @param datmax todo
@@ -109,37 +109,30 @@ calculate.outputrows <- function(DAT_mat, stepsize) {
109109# '
110110# ' @export get.step.sequence
111111
112+
113+
114+
115+
116+ # ## THIS IS NOT DONE
112117get.step.sequence <- function (datmin = 0 , datmax = 100 , stepsize = 25 ) {
113118 timespan <- datmax - datmin
114119 if (timespan %/% stepsize == 0 ) {
115120 if (timespan > (stepsize * 0.6 )) {
116121 sequence <- c(datmin , round(((datmin + datmax )/ 2 ), digits = 0 ), datmax )
117- print(sequence )
118122 } else {
119123 sequence <- c(datmin , datmax )
120- print(sequence )
121124 }
122125 } else {
123126 sequence <- seq(from = datmin , to = datmax , by = stepsize )
124127 resid <- datmax - sequence [length(sequence )]
125- print(paste(" can fit " , timespan %/% stepsize , " times" , sep = " " ))
126- print(paste(" from: " , datmin , " to: " , datmax , sep = " " ))
127- print(paste(" there was a rest of " , resid ))
128-
129128 if (resid > = (stepsize / 2 )) {
130- print(" and i resolved it this way:" )
131129 stepsize_mod <- (datmax - datmin )/ length(sequence )
132130 sequence <- round(seq(datmin , datmax , stepsize_mod ), digits = 0 )
133- print(sequence )
134131 } else if (resid != 0 ) {
135- print(" sasad" )
136132 move <- round(resid / (length(sequence )- 1 ), digits = 0 )
137133 sequence [2 : length(sequence )] <- sequence [2 : length(sequence )] + move
138134 sequence [length(sequence )] <- datmax
139- print(sequence )
140135 } else {
141- print(" and i didnt resolve anything:" )
142- print(sequence )
143136 }
144137 }
145138 return (sequence )
@@ -192,6 +185,7 @@ create.sub.objects <- function(DAT_mat, stepsize) {
192185 wip [5 ] <- step
193186 wip [4 ] <- wip [4 ] / length(sequence )
194187 first_na <- match(NA , result [,1 ])
188+ # ## HIER GIBT ES EIN PROBLEM
195189 result [first_na ,1 ] <- wip [1 ]
196190 result [first_na ,3 ] <- wip [2 ]
197191 result [first_na ,4 ] <- wip [3 ]
0 commit comments