By default, the cowplot module is not available in r studio. You can use the below-given command to install cowplot module.
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
Installing package into ‘C:/Users/Nadeem Akhter/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/cowplot_1.0.0.zip'
Content type 'application/zip' length 1366421 bytes (1.3 MB)
downloaded 1.3 MB
package ‘cowplot’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
I hope this will solve your error.