ropensci / chromer

package for interacting with the chromosome counts database (CCDB) at https://taux.evolseq.net/CCDB_web/
https://docs.ropensci.org/chromer
Other
12 stars 4 forks source link

NULL cannot have an attribute #29

Closed chenqh0618 closed 1 year ago

chenqh0618 commented 4 years ago

chrom_counts("Castilleja_miniata", "species")

Error in attr(res, "class") <- c(attr(res, "class"), "chrom.counts") : NULL cannot have an attribute

orchid00 commented 4 years ago

hi @chenqh0618, thanks for reporting this. I will look into it in the coming days.

orchid00 commented 4 years ago

@chenqh0618 I wasn't able to reproduce the error. Would you be able to install the package again, and then run your code once more? or try this: a <- chrom_counts(taxa = "Castilleja_miniata", rank = "species")

the result is a tibble of 11 X 4

 chrom_counts("Castilleja_miniata", "species")
# A tibble: 11 x 4
   resolved_binomi~ gametophytic sporophytic
   <chr>            <chr>        <chr>      
 1 Castilleja_mini~ NA           "48"       
 2 Castilleja_mini~ 24            NA        
 3 Castilleja_mini~ 12            NA        
 4 Castilleja_mini~ 12            NA        
 5 Castilleja_mini~ 12, 24, 36,~  NA        
 6 Castilleja_mini~ 48, c.72      NA        
 7 Castilleja_mini~ 24            NA        
 8 Castilleja_mini~ 12           "24"       
 9 Castilleja_mini~ 12            NA        
10 Castilleja_mini~ NA           "48"       
11 Castilleja_mini~ 24           ""         
# ... with 1 more variable:
#   resolved_name <chr>
chenqh0618 commented 4 years ago

sorry,

I tried installed the package again and code you suggested, but returned the same answer

"NULL cannot have an attribute"

Thanks anyway~

orchid00 commented 4 years ago

Hi @chenqh0618 what is your R version? I tested with R version 3.6.2, 3.6.1, 3.5.3, 3.5.2. You can check by typing version in the console. If your version is older than R version 3.5.3 (Great Truth) it is suggest that you update it, keeping in mind you might need to update multiple packages too. You also need a stable internet connection. Those are the issues I can think of.

If you are using R studio, you could restart R (ctrl+Shift+F10) then run

devtools::install_github("ropensci/chromer")

library(chromer)
chrom_counts("Castilleja_miniata", "species")

Today, I've asked other people to run these three lines and I will report on any updates.

chenqh0618 commented 4 years ago

Thanks a lot, the problem has been sovled when I installed the package from github as you suggested!

I am using R studio with R in version 3.6.2, the error might be caused my unsuitable installing from CRAN~

orchid00 commented 4 years ago

Cool, so we solved one problem. 🎉

I'll be looking at updating the CRAN version in the coming days.