Unless I have missed something somewhere, the object is named "graph" not
"RData" . Further, the call to by() is complete nonsense, with arguments
misspecified -- there is no "names.arg" argument to by() (the 2nd argument
is named "INDICES")
It appears that some people need to spend some time with
Adding back context which was omitted by this Nabble user who still does not
understand the mailing list conventions:
> On May 27, 2015, at 2:28 AM, Shivi82 wrote:
>
>> Hello All,
>> I need help on creating a histogram for one of my data. The data is as below
>> (sample):
>> MFST_WT Hours
I don't know why that doesn't work, but try adding in
sep=","
In your read.csv()
That shouldn't matter as to whether or not it recognizes your object though,
but it will matter in how your object is read.
Other simple things might be to make sure the file is saved and then close it
out to mak
Hello,
> Now I have changed the file to a new file as RData.csv file and now when I
> use the below code it gives me an error
> graph<- read.csv("RData.csv", header = TRUE)
Here you read RData.csv into R as a data frame named graph.
> MonthlyWeight<-by(RData$Weight,names.arg = RData$Month,sum)
HI David,
So if I understand from your post below, when we import a file in R- we need
to make sure that the variable names do not have any space nor they should
be in special characters or not in comma format.
Please correct me I am wrong.
Now I have changed the file to a new file as RData.csv f
On May 27, 2015, at 2:28 AM, Shivi82 wrote:
> Hello All,
> I need help on creating a histogram for one of my data. The data is as below
> (sample):
> MFST_WT Hours PROCESS Month Weekday Day of the Month
> 6,828 13 INBOUND Mar Fri13
> 2,504 16
On 27/05/2015 11:56, Shivi82 wrote:
HI Jim,
Thanks for the help however R throws an error when i create a var
tot_mon_wt-
tot_mon_wt<-by(mwlc$MFST_WT,mwlc$Month,sum). It gives me an error =
Error in Summary.factor(c(1L, 1L), na.rm = FALSE) :
‘sum’ not meaningful for factors
Not sure what t
HI Jim,
Thanks for the help however R throws an error when i create a var
tot_mon_wt-
tot_mon_wt<-by(mwlc$MFST_WT,mwlc$Month,sum). It gives me an error =
Error in Summary.factor(c(1L, 1L), na.rm = FALSE) :
‘sum’ not meaningful for factors
Not sure what this error refers to. Thank you, Shivi
Hi Shivi82,
My suggestion is that the error concerned a mismatch between the
number of labels and the number of bars.
More seriously, you seem to want to sum the values of weight (MFST_WT)
within each month. So:
tot_mon_wt<-by(mwlc$MFST_WT,mwlc$Month,sum)
barplot(tot_mon_wt, names.arg = sort(uniq
Hello All,
I need help on creating a histogram for one of my data. The data is as below
(sample):
MFST_WT Hours PROCESS Month Weekday Day of the Month
6,828 13 INBOUND Mar Fri13
2,504 16 INBOUND Mar Fri27
20
10 matches
Mail list logo