R Error: '$ operator is invalid for atomic vectors' - How to Fix
This error occurs because you cannot use the '$ operator on a numeric vector. It is generally used to access elements of a list or data frame by their name.
In this case, it seems that 'p_both_layout' is not a list or data frame, but rather a numeric vector. Therefore, you cannot use the '$ operator to access its elements.
To fix this error, you may need to check the type of the object 'p_both_layout' and make sure it is a list or data frame. Alternatively, you may need to use a different method to access its elements, such as indexing with square brackets ([]).
原文地址: https://www.cveoy.top/t/topic/muQn 著作权归作者所有。请勿转载和采集!