Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include caption and footnotes in collapse_row output #5

Open
cstubben opened this issue Jul 28, 2020 · 3 comments
Open

Include caption and footnotes in collapse_row output #5

cstubben opened this issue Jul 28, 2020 · 3 comments

Comments

@cstubben
Copy link
Contributor

Include the caption and footnotes in collapsed table output

doc <- pmc_xml("PMC2231364")
x <- pmc_table(doc)
collapse_rows(x[1])
# new function or option above
collapse_table(x[1])
   table     row     text                                                                                                                 
   <chr>   <int>     <chr>       
 1 Table 1 Caption   Stress-responsive operons in Y. pestis predicted from microarray expression data                                                                                                      
 2 Table 1     1     subheading=Iron uptake or heme synthesis; Potential operon (r value)=yfeABCD operon* ...
 3 Table 1     2     subheading=Iron uptake or heme synthesis; Potential operon (r value)=hmuRSTUV operon ...
...
30 Table 1 Footnote  'r' represents the correlation coefficient of adjacent genes; '*' represent the defined...
@kcmtest
Copy link

kcmtest commented Jul 29, 2020

So is it not possible to save table like this form only so that i can the tabular form is intact , you would ask me why i would like to keep as such..for example if in paper they have metadata about patient information lets say age gender then similar drug dosage i would like to append it for my downstream analysis or curation. The way you are combining the table is it possible to reverse it and get back the tabular form?

$PMC7372828
$PMC7372828$`Table 1`
# A tibble: 28 x 2
   X1                                                                 X2   
   <chr>                                                              <chr>
 1 AML with recurrent genetic abnormalities                           NA   
 2 AML with t(8;21)(q22;q22.1);RUNX1-RUNX1T1                          NA   
 3 AML with inv. (16)(p13.1q22) or t(16;16)(p13.1;q22);CBFB-MYH11     NA   
 4 APL with PML-RARA                                                  NA   
 5 AML with t(9;11)(p21.3;q23.3);MLLT3-KMT2A                          NA   
 6 AML with t(6;9)(p23;q34.1);DEK-NUP214                              NA   
 7 AML with inv. (3)(q21.3q26.2) or t(3;3)(q21.3;q26.2); GATA2, MECOM NA   
 8 AML (megakaryoblastic) with t(1;22)(p13.3;q13.3);RBM15-MKL1        NA   
 9 Provisional entity: AML with BCR-ABL1                              NA   
10 AML with mutated NPM1                                              NA   
# … with 18 more rows

@kcmtest
Copy link

kcmtest commented Jul 29, 2020

https://stackoverflow.com/questions/56374683/write-list-of-lists-to-separate-csv-files
this is one of the way i found to write down the files from individual list I would be glad if you can incorporate such fucntion in your library then as an end user I would be really glad

@kcmtest
Copy link

kcmtest commented Jan 31, 2021

how do i limit the search data? there is no option to define the date upper and lower limit to search ```
epmc_search(
query = NULL,
output = "parsed",
synonym = TRUE,
verbose = TRUE,
limit = 100,
sort = NULL
)


Is there a way i can do the same? set date limit and do the search?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants