본문 바로가기

전체 글26

[SAS] Import excel file (+specifying a sheet) proc import file="C:\Users\data.xlsx" out=dt dbms=xlsx; sheet="Sheet 1"; run; 2022. 4. 22.
09. [STATA] Meta-analysis OR /* install packages for meta */ ssc install metan ssc install metabias ssc install metafunnel ssc install midas import excel "\\Data1.xlsx", sheet("Fig2") firstrow The data we have has variable "Study, OR, LCI, UCI" The data is from the paper about aspirin and breast cancer (Ting Lue et al, 2012) /* Forest Plot */ metan OR LCI UCI metan OR LCI UCI, random label(namevar=Study) metan OR LCI UCI.. 2022. 3. 25.
R Select Variables 변수 선택하기 Select Variables (원하는 변수 선택하기) 내장되어 있는 iris 데이터를 사용하도록 하겠습니다. In this example, built-in dataset, iris, will be used. # iris 데이터의 상위 row들이 뭘 보여주는지를 프린트하는 구문 # this shows top rows of the data head(iris) # 출력된 결과물 # printed results # Sepal.Length Sepal.Width Petal.Length Petal.Width Species # 1 5.1 3.5 1.4 0.2 setosa # 2 4.9 3.0 1.4 0.2 setosa # 3 4.7 3.2 1.3 0.2 setosa # 4 4.6 3.1 1.5 0.2 setosa #.. 2021. 12. 14.
[Leetcode] 2016. Maximum Difference Between Increasing Elements Review of the Leetcode 2016. Maximum Difference Between Increasing Elements. Below was my answer. I approached this problem as getting difference using combination not breaking the rule of the order. from itertools import combinations class Solution: def maximumDifference(self, nums: List[int]) -> int: ans = [] if nums.index(max(nums)) > nums.index(min(nums)): return max(nums)-min(nums) else: co.. 2021. 10. 26.