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)
So
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
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 make
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 PROCESS
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 R
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
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
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 =
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
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
10 matches
Mail list logo