Hi,
thank for the reply,
I tried your suggestion but it is still not working. I'm sure I'm doing something wrong. The tibble I got is what I want to save in other formats, like csv or xlsx. Below there is an example of what I do, could you check or any body. Best wishes
> getwd()
[1] "C:/Users/Anyelo/Documents/recentfishes"
> library(rfishbase)
> library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
> diet_items("Acipenser baerii")
# A tibble: 40,810 × 15
autoctr DietCode FoodI FoodII FoodIII Stage DietP…¹ ItemN…² Comment DietS…³ DietS…⁴ Alpha…⁵ PreyT…⁶
<int> <int> <chr> <chr> <chr> <chr> <dbl> <chr> <chr> <int> <int> <chr> <dbl>
1 122522 1 zoobenthos mollus… bivalv… n.a.… 1 gastro… 0.8% b… NA NA GAS NA
2 101628 1 nekton finfish bony f… juv.… 18.1 Trisop… 1% <i>… 481 NA POD NA
3 107359 1 zoobenthos benth.… lobste… juv.… 12.6 Galath… Galath… NA NA LOQ NA
4 119985 1 zoobenthos worms polych… juv.… 2.30 polych… NA NA NA WOR NA
5 116667 1 zoobenthos benth.… shrimp… juv.… 5 Pandal… Pandal… NA NA PDZ NA
6 112452 1 zoobenthos benth.… shrimp… juv.… 5.30 Macrop… 0.5% <… NA NA NA NA
7 95620 1 zoobenthos benth.… shrimp… juv.… 55.7 Nephro… <i>Nep… NA NA NA NA
8 125806 2 zoobenthos mollus… bivalv… juv.… 1.60 gastro… incl. … NA NA GAS NA
9 116668 2 nekton finfish bony f… juv.… 4.80 Merlan… <i>Mer… 29 NA WHG 4.37
10 112453 2 nekton finfish bony f… juv.… 5.10 Trisop… <i>Tri… 481 NA POD 3.83
# … with 40,800 more rows, 2 more variables: PreySeTroph <dbl>, PreyRemark <chr>, and abbreviated variable
# names ¹DietPercent, ²ItemName, ³DietSpeccode, ⁴DietSpeccodeSLB, ⁵AlphaCode, ⁶PreyTroph
# ℹ Use `print(n = ...)` to see more rows, and `colnames()` to see all variable names
> library(readr)
> write_csv(mysample,"C:/Users/Anyelo/Documents/recentfishes/data.csv")
Error in is.data.frame(x) : object 'mysample' not found