Skip to content

Problem with Median

5 messages · Suhaila Haji Mohd Hussin, Sarah Goslee, Duncan Murdoch +1 more

#
Please use dput() to give us your data (eg dput(data) ) rather than
simply pasting it in.

Sarah

On Mon, May 7, 2012 at 2:52 PM, Suhaila Haji Mohd Hussin
<bell_beauty12 at hotmail.com> wrote:

  
    
#
I might be silly but if I was going to type in dput() then how should I send the data over here? 
Instead, I've just uploaded the image online, you can access it via the link below.
http://i1165.photobucket.com/albums/q585/halfpirate/data.jpg
#
On 07/05/2012 3:05 PM, Suhaila Haji Mohd Hussin wrote:
Cut and paste.  For example,  if I have a dataframe named x and type 
dput(x), I see

structure(list(a = 1:10), .Names = "a", row.names = c(NA, -10L
), class = "data.frame")

If you run

x <- structure(list(a = 1:10), .Names = "a", row.names = c(NA, -10L
), class = "data.frame")

you'll get a dataframe that looks just like mine.  Then you can start to 
answer questions about it.

I can't do anything with your jpeg to answer your questions about your 
dataframe.

Duncan Murdoch
1 day later
#
Hi
outputs tou your console

structure(list(sklon = c(95, 95, 40, 40, 40, 40, 20, 20, 20, 
20, 20, 20, 20), ot = c(15, 4, 10, 15, 4, 1.5, 1.5, 4, 10, 15, 
4, 10, 15), doba = c(5.883333333, 15.75, 12.5, 9.166666667, 27, 
65.16666667, 88, 38.25, 17.33333333, 12.5, 38.2, 17.3, 12.5)), .Names = 
c("sklon", 
"ot", "doba"), row.names = c(NA, 13L), class = "data.frame")

you can copy it to your mail and anybody can just paste this and assign it 
to an object.

a.AC <- subset(data, class == "A-C", select = a)
This result probably in data frame (you can check by str(a.AC)) and as 
such you can not put it directly to median function.

Regards
Petr
link below.
A-D
'double'
http://www.R-project.org/posting-guide.html