Hello everyone. I'm a beginner with this program.I find this error when making an analysis through decision trees.
> str(nba)
tibble [100 x 5] (S3: tbl_df/tbl/data.frame)
$ PG : num [1:100] 78 77 72 64 69 60 64 78 80 82 ...
$ PI : num [1:100] 78 77 72 64 69 60 64 78 80 82 ...
$ MPG : num [1:100] 36.8 36.9 32.8 33.7 33.8 34 35 34.6 35.5 34.9 ...
$ PPG : num [1:100] 36.1 28 27.7 27.5 27.3 26.6 26.6 26 25.8 25.6 ...
$ SALARY: num [1:100] 30570000 30560700 24157304 25467250 37457154 ...
> setup<-tree.control(nrow(nba), mincut=5,minsize = 10,mindev = 0.10)
> n_trees<-tree(SALARY~MPG+PPG,control=setup)
> n_trees
Error in cat(x, ..., sep = sep) :
argument 1 (type 'list') cannot be handled by 'cat'
Running "n_trees", I should find this type of output:
Can anyone help me understand where the problem comes from? Thanks.