ICode9

精准搜索请尝试: 精确搜索
  • tidyverse2021-12-19 11:32:16

      用到R语言自带的mtcars数据集,首先我们把它转化成tibble形式,然后存放在mtcars1中。准备代码如下: library(tidyverse) mtcars %>% as_tibble() -> mtcars mtcars %>% group_by(cyl) %>% slice(1:3)  %>%  ungroup() mtcars %>% group_by(cyl) %>%  arrange(desc(hp)) %>% sli

  • R语言练习(自存)2021-12-09 23:00:25

    第一次 #1.1.1 x <- seq(from=1,to=99,by=2) #1.1.2 x<-1:100 index = rep(c(TRUE, FALSE), 100) x<-x[index] x<-x[!is.na(x)] #1.1.3 x<-NULL num<-1 for(i in 1:50){   x[i]<-num  num<-num+2 } # 1.2  y<-rep(1:5,10) # 1.3  z <- c(x,y) is.

  • C++面向对象总结——类的实践2021-07-29 13:32:10

    直接看题吧: 第一题 输入圆的半径和圆柱的高,依次输出圆周长、圆面积、圆柱体积(π取 3.14)。 #include<iostream> using namespace std; class cylinder { public: cylinder() :PI(3.14) { cout << "请输入半径" << endl; cin >> cyl_radius; cout

  • 接毒瘤2021-05-29 18:57:18

    【题目描述】 24OI的成员跑到了一片大森林,目的是摘一些毒瘤回去给高一同学吃。于是在毒瘤树下,cyl沿着一条线钉了N个木桩,并且在相邻两个木桩之间结网,初始时所有的网中都没有毒瘤。之后,树上可能会掉下毒瘤,cyl也可能拿走一部分毒瘤,我们统一把它们称为“操作”。在等毒瘤落下的cyl同学

  • Python for Data Science - Delving into non-parametric methods using pandas and scipy2021-01-16 11:35:05

    Chapter 5 - Basic Math and Statistics Segment 6 - Delving into non-parametric methods using pandas and scipy import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sb from pylab import rcParams import scipy from scipy.s

  • 数据可视化实例(六): 带线性回归最佳拟合线的散点图2020-05-11 23:01:18

    https://datawhalechina.github.io/pms50/#/chapter3/chapter3 如果你想了解两个变量如何相互改变,那么最佳拟合线就是常用的方法。 下图显示了数据中各组之间最佳拟合线的差异。 要禁用分组并仅为整个数据集绘制一条最佳拟合线,请从下面的 sns.lmplot()调用中删除 hue ='cyl'参数。

  • [R]在dplyr基础上编写函数-(2)substitute和quote2019-09-01 22:02:35

    关于这两个函数,官方是这么定义的: substitute returns the parse tree for the (unevaluated) expression expr, substituting any variables bound in env. quote simply returns its argument. The argument is not evaluated and can be any R expression. 貌似看不懂,看几个

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有