You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to GitHub, this is my first post. I'm using R x64 3.4.1 on Windows 10 and trying to run the function ddply in the plyr package. I've attached a screenshot of some code as I can't share the data: I'm working with a large dataframe and so I've created a smaller dataframe to illustrate the issue. I've created "lm" with 40 obs and 4 variables, three variables I'm interested in and one I'm not ("blah"). I produce the names of the variables in the dataframe and then run ddply to get the mean based on "CAsNum" and "tAsNum" with the condition that the values of "qAsNum" are between 1 and 5. Works great.
When I try to do the same with another dataframe, "fullData," I get the error cited in the title. But before I produce the error, I show the names of the variables in "fullData" to show that the three variables of interest have the same name (of note, they are of class "numeric"), and then I table each to show there are no "NA" in these variables. I've looked at many, many postings online but found no fix for this issue. Any advice would be welcome.
Justin
The text was updated successfully, but these errors were encountered:
Hey Justin,
I think one year of waiting is enough now:
The Problem might be a missing "," in your last coderow in the screenshot.
So instead of "mean(.......[... & qAsNum<=5]))", it has to be "mean(.......[... & qAsNum<=5 , ]))"
Hello everyone,
I am new to GitHub, this is my first post. I'm using R x64 3.4.1 on Windows 10 and trying to run the function ddply in the plyr package. I've attached a screenshot of some code as I can't share the data: I'm working with a large dataframe and so I've created a smaller dataframe to illustrate the issue. I've created "lm" with 40 obs and 4 variables, three variables I'm interested in and one I'm not ("blah"). I produce the names of the variables in the dataframe and then run ddply to get the mean based on "CAsNum" and "tAsNum" with the condition that the values of "qAsNum" are between 1 and 5. Works great.
When I try to do the same with another dataframe, "fullData," I get the error cited in the title. But before I produce the error, I show the names of the variables in "fullData" to show that the three variables of interest have the same name (of note, they are of class "numeric"), and then I table each to show there are no "NA" in these variables. I've looked at many, many postings online but found no fix for this issue. Any advice would be welcome.
Justin

The text was updated successfully, but these errors were encountered: