Posts by Lucas • 3,858 points
153 posts
-
1
votes1
answer502
viewsA: Qual é a diferença entre os.path.dirname(os.path.abspath(__file__)) e os.path.abspath(os.path.dirname(__file__))
The way you are doing operations, the result has to be identical even. The function os.path.dirname('file') returns the name of the directory where the file is, but this name may be relative. For…
-
5
votes3
answers174
viewsA: A: Column average over the range of values in R
I believe that R is not understanding which variable it needs to use in the second comparison. That is why it needs to be repeated. Using the which function for that case, we would have:…
-
5
votes2
answers2044
viewsA: Transpose a dataframe into R
Just do: as.data.frame(t(df)) EDIT: As I said in the comment, maybe it’s better to use '_' instead of space in the name of variables. In this case, we have: > df LOCATION jan_1999 fev_1999…