This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cov2cor <- function(x) { | |
for (i in 1:dim(x)[1]){ | |
for (j in 1:dim(x)[2]){ | |
x[i,j]<-x[i,j]/sqrt(x[i,i]/sqrt[j,j] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mulsum <- function(x) { | |
print(mean(x)) | |
print(cov(x)) | |
print(cor(x)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /mmt/share | |
sudo mount -t vboxsf winshare/mnt/share |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
发信人: debian (6e9552c9bd8e61c8f277c21220160234), 信区: Emacs | |
标 题: FAQ(2006/11/24) | |
发信站: BBS 水木清华站 (Tue Nov 18 19:53:18 2003), 转信 | |
Welcome to Emacs Heaven ! Happy Hacking ! -*- outline -*- | |
Emacs FAQ | |
* General | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*****************************************************************************************/ | |
SAS/IML software gives you access to a powerful and flexible programming language | |
*(Interactive Matrix Language) in a dynamic, interactive environment. | |
* | |
*The fundamental object of the language is a data matrix. | |
*You can use SAS/IML software interactively (at the statement level) to see results immediately, | |
*or you can store statements in a module and execute them later. | |
*The programming is dynamic because necessary activities such as memory allocation and | |
*dimensioning of matrices are performed automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colors = [['red', 'green', 'green', 'red' , 'red'], | |
['red', 'red', 'green', 'red', 'red'], | |
['red', 'red', 'green', 'green', 'red'], | |
['red', 'red', 'red', 'red', 'red']] | |
measurements = ['green', 'green', 'green' ,'green', 'green'] | |
motions = [[0,0],[0,1],[1,0],[1,0],[0,1]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###########data import################### | |
d<-read.csv('meta4digital.csv') | |
####################### fixed effect size##################### | |
df<-length(d$dIChR)-1 | |
# 1/var of each study | |
W<-1/d$varIChR | |
# g of each study | |
Y<-d$dIChR | |
# sum var | |
M<-sum(W*Y)/sum(W) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"os" | |
"io" | |
"bufio" | |
"fmt" | |
"strconv" | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; echowuhao's solution to Intro to Vectors | |
;; https://4clojure.com/problem/6 | |
:a :b :c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;convert all the xsl files to csv files in one directory | |
;get all the file names in one directory | |
(def directory (clojure.java.io/file "C:/Users/echo/Dropbox/7000/data-sets")) | |
(def files (file-seq directory)) | |
(def filestr (map str files)) | |
;find all the xls files in the directory | |
(def xlsfiles (filter #(re-find #".xls" %) filestr)) | |
;clojure.string/replace | |
(defn xsl2csv [x] (save (read-xls x) (clojure.string/replace x #"xls" "csv"))) | |
;convert all the xls file to csv files |
OlderNewer