Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
R1
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#R version 3.3.2 file_ <- file("stdin") dat<-read.table(file_, sep = ",") dat y<-t(dat) y a<-table(y) a f<-as.data.frame(a) f[,3]<- 100*a/(sum(a)) f f[,4]<- cumsum(a) f colnames(f)<-c("значение","частота","частость","накопленная частота") f plot(a,type = "l", main = "Frequency range", xlab = "value", ylab = "frequency") d<-as.numeric(y) d v<-sort(d) v x<-unique(v) x y<-as.numeric(f[,4]) y plot(x,as.numeric(f[,4]),type="l",xlab="value",ylab="accumulated frequency", main= "Absolute frequency cumulates")
45, 46, 47, 46, 45, 47, 42, 42, 43, 44, 45, 46, 44, 43, 43, 44, 42, 44, 43, 44, 42, 43, 44, 45, 46, 46, 43, 44
[
-
]
Show input
Absolute running time: 0.58 sec, cpu time: 0.62 sec, memory peak: 33 Mb, absolute service time: 0,59 sec
edit mode
|
history
|
discussion