Making a complex barley from R

I am trying to make a yaml file from R. I know there is a package for such a job, but its example is so simple and my object is a bit more complicated !!

so I would like to do something like the following, but I don’t know how to format it as an R object (dataframe ?!):

tree:
  format: newick
  translate: ./My_example-1.translation
  file: ./Xtol_example-1.tree
tracks:
  - class: colorstrip
    source: ./My_example-1.catdomain

    rel_height: 0.6
    title: Catalytic domain
  - class: colorstrip
    source: ./My_example-1.kingdom
    rel_height: 0.6
    title: Itsname
  - class: colorstrip
    source: ./My_example-1.temp
+3
source share
2 answers

My short tip is do not use yaml with R.

(Editor's note: it seems that the problems described here have been fixed - see comments.)

Problem 1

The Yamal package in R seems to be unsuitable, but the real problem seems to be related to R. But again, I didn’t worry about the jar until I saw this question, so there may be gaps in my understanding of the whole question.

, - , ( ). , R. , , . , (, , , , , ).

, , .., , R ( ). , , , ().

, , , yaml R.

2

R yaml , , . , , . ( ) - yaml R, R yaml.

library("yaml")
z <- yaml.load(
"tree:
  format: newick
  translate: ./My_example-1.translation
  file: ./Xtol_example-1.tree
tracks:
  - class: colorstrip
    source: ./My_example-1.catdomain

    rel_height: 0.6
    title: Catalytic domain
  - class: colorstrip
    source: ./My_example-1.kingdom
    rel_height: 0.6
    title: Itsname
  - class: colorstrip
    source: ./My_example-1.temp")
names(z)
names(z$tracks)
y <- as.yaml(z)

, . , , yaml R. XML - .

+4

All Articles