M
M
Mr_Abryz2020-03-04 14:10:13
R
Mr_Abryz, 2020-03-04 14:10:13

R+knitr. Is it possible to form a list of itemize by condition from the list?

Greetings!
Through transformations and filtering, I got:

Category                                 n
  <fct>                                <int>
1 Ошибки при вводе данных                121
2 Отсутсвие предварительной обрабоки      17
3 Прочее                                  14
4 Программные ошибки                       1


> str(low_risk)
Classes ‘grouped_df’, ‘tbl_df’, ‘tbl’ and 'data.frame':	4 obs. of  2 variables:
 $ Category : Factor w/ 9 levels "Ошибки при вводе данных ",..: 4 9 7 3
 $ n                  : int  121 17 14 1
 - attr(*, "groups")=Classes ‘tbl_df’, ‘tbl’ and 'data.frame':	4 obs. of  2 variables:
  ..$ Category : Factor w/ 9 levels "Ошибки при вводе данных ",..: 3 4 7 9
  ..$ .rows              :List of 4
  .. ..$ : int 4
  .. ..$ : int 1
  .. ..$ : int 3
  .. ..$ : int 2
  ..- attr(*, ".drop")= logi TRUE


It is necessary in Rnw to form a line of the form:
Data entry errors - 121 (80% of the total), Lack of preprocessing - 17 (14% of the total)

(i.e. 1 row of the 1st column of the dataframe is taken from the table -- 1 row 2nd column of the dataframe,)) and so on. to the end length(low_risk$n) )

That's just how to form and insert data and it doesn't work. It is clear that everything revolves around the for loop, but there is very little experience with R.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question