Welcome to the forum!
If you break down the error message, you’ll see you get two parts. The first part is the problem:
Error in read_qza(tree, tmp = tmp) : Input artifact (rooted-tree.qza) not found.
rooted-tree.qza file cannot be found at that path.
The second part is a suggested fix:
Please check path and/or use list.files() to see files in current working directory.
Solution: make sure you’re in the right directory and check the files that are there for the
My guess is you’re not pointing to the correct file from R. Try the full path.