 sampleD<-c(0.7,-1.6,-0.2,-1.2,-0.1, 3.4,3.7,0.8,0.0,2.0)  
 sampleL<-c(1.9, 0.8, 1.1, 0.1,-0.1, 4.4,5.5,1.6,4.6,3.4)
 #--------- # two-sample test ---unpaired t-test -----
 t.test(sampleD,sampleL, alternative = "two.sided", 
              paired = F, var.equal = F, conf.level = 0.95)
 mean(sampleD-sampleL)

 #--------- # two-sample test ---paired t-test -----
 t.test(sampleD,sampleL, alternative = "two.sided", 
       paired = T, var.equal = F, conf.level = 0.95)

 #--------- # one-sample test --------
 diffdata<-sampleD-sampleL
 t.test(diffdata,mu=0, alternative = "two.sided", 
       paired = F, var.equal = F, conf.level = 0.95)