[R] print median and sd...

johnhj jharris at web.de
Fri Mar 13 17:09:04 CET 2009


Ok, sorry...

here is my code so far...


x <-read.table(file="D:/output.txt")	
x$grup <- 25*rep(1:144, each=5)

median<-with(x, tapply(V3, grup, median))

sd<-with(x, tapply(V3, grup, sd))

I will plot to types of graph. One graph with the median values for example
with the "plot()" function, the other one is the standard derivation. I will
plot the s.d. with "barplot()". What do you think, is it generally common to
plot the s.d. with his histograms ?



jholtman wrote:
> 
> Can you provide a reproducible example with the data so that we
> understand what you are working with.  Need to see what the structure
> of 'x' and 'median' are.
> 
> On Fri, Mar 13, 2009 at 8:35 AM, johnhj <jharris at web.de> wrote:
>>
>> Hii Jholtman,
>>
>> I will make a graph of the median values and not to print to the console.
>>
>> I tried to plot with:
>>
>> plot(V3 ~ grup, data = median) ??
>> but I get an error message.
>>
>> I also tried to print the output of median<-with(x, tapply(V3, grup,
>> median)) to a text file with the X and Y Koordinates to plot it explicit
>> with plot(x,y) but I could not figure out the X  Values.
>>
>> I have not su much experience with R, I would be thankful if you could
>> help
>> me...
>>
>>
>>
>>
>>
>>
>> jholtman wrote:
>>>
>>> Where do you want to print it? Is it the console (if so, try
>>> 'print(median)') or if it is the plot, use 'text' with the appropriate
>>> parameters.  It would help if you listed the " I tried many things but
>>> without success..." and what you were expecting vs. what you got.
>>> Reproducible code would be useful (and required).
>>>
>>> On Thu, Mar 12, 2009 at 10:42 PM, johnhj <jharris at web.de> wrote:
>>>>
>>>> Hii,
>>>>
>>>> Can anybody help me, I don't know how to print the "median". Below is
>>>> my
>>>> code snipplet...
>>>>
>>>> x
>>>> <-read.table(file="D:/Uni/Diplom/Diplom/Grafiken/R/BATMAN/Kabel/Batman1hop/Standardabweichung__output_30_1_Kabel(30m)_b.txt")
>>>>
>>>> png(filename = "D:/Grafiken/R/Standardabweichung/Kopie.png", width =
>>>> 640,
>>>> height = 480,pointsize = 12, bg = "white",  res = NA)
>>>>
>>>> median<-with(x, tapply(V3, grup, median))
>>>>
>>>> ???
>>>>
>>>> dev.off()
>>>>
>>>> I will print, the median values with a simple line.. I tried many
>>>> things
>>>> but
>>>> without success...
>>>> I would be very appreciate, if anyone could help me...
>>>>
>>>> greetings,
>>>> John
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/print-median-and-sd...-tp22489185p22489185.html
>>>> Sent from the R help mailing list archive at Nabble.com.
>>>>
>>>> ______________________________________________
>>>> R-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>
>>>
>>>
>>> --
>>> Jim Holtman
>>> Cincinnati, OH
>>> +1 513 646 9390
>>>
>>> What is the problem that you are trying to solve?
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/print-median-and-sd...-tp22489185p22495481.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> 
> 
> -- 
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
> 
> What is the problem that you are trying to solve?
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: http://www.nabble.com/print-median-and-sd...-tp22489185p22499716.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list