It looks like you've changed the line. The original is:
tree <- phytools::read.newick(system.file("extdata","phylotree.newick", package="RCy3"))
Which is grabbing an example newick file provided by the RCy3 package. You've replaced with filename with a local path, which obviously is not a part of the RCy3 package. So, here are two fixes, depending on your intent:
Restore the original line in order to run the example data
Replace the entire example file call with your local file, like so:
.
tree <- phytools::read.newick("C:/Users/chuck/Desktop/tree.newick")
I then get the following error..
.
RCy3::commandsPOST, HTTP Error Code: 500
url=http://localhost:1234/v1/commands/vizmap/apply
body={
"styles": "default"
}
Error in commandsPOST("vizmap apply styles=\"default\"", base.url = base.url) :
No network views selected.