Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何为大量数据集创建cdf_R_Histogram_Scale_Cdf - Fatal编程技术网

R 如何为大量数据集创建cdf

R 如何为大量数据集创建cdf,r,histogram,scale,cdf,R,Histogram,Scale,Cdf,我有一个文件大小的数据集,其中有15146条记录,值从0到536870912,存储在数据集dt中,有两列cov(行号)和sp(值)。我正在设法创建直方图使用 h <- hist(dt$sp, breaks=c(0, 1024, 2048,4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 1342

我有一个文件大小的数据集,其中有15146条记录,值从0到536870912,存储在数据集dt中,有两列cov(行号)和sp(值)。我正在设法创建直方图使用

 h <- hist(dt$sp, breaks=c(0, 1024, 2048,4096, 8192, 16384, 32768, 65536,
131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432,
67108864, 134217728, 268435456, 536870912, 1073741824, 21467483648, 42934967296,
85869934592, 171739869184, 343479738368, 686959476736))
结果是这样的图


我设法得到类似graf 1的更好的规模使用

ggplot(mrdaj, aes(x=bin, y=procent))+geom_point()+scale_x_log10()
但我想画一条连接所有点的l线:)

我是否需要确定分布(可能是正常的,并使用参数添加到此图上),或者我可以说使用数据(原始数据或频率)生成cdf图并添加


我从来没有使用过这么大的数据值。我如何添加/创建cdf以及如何添加到此图表。正如您所看到的,我使用log As scale,是否有更好的方法来创建此图表。thx

也许您正在寻找
绘图(dt$sp[order(dt$sp)],type=“s”)
。我使用ggplot(mrdaj,aes(x=bin,y=procent))+geom\u point()+比例尺×对数10()
ggplot(dt, aes(sp)) + geom_density() + geom_histogram() 
+ scale_x_log10(breaks = c(0,1024, 2048,4096, 8192, 16384, 32768, 65536, 
131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 
67108864, 134217728, 268435456, 536870912, 1073741824, 21467483648, 42934967296,
 85869934592, 171739869184, 343479738368, 686959476736)))
ggplot(mrdaj, aes(x=bin, y=procent))+geom_point()+scale_x_log10()