data = read.table("file", header=TRUE)R commands for PCAHere are some R commands for PCApcdat = princomp(data) - It does actual job and put the results to pcdat. It will use covariance matrixpcdat = princomp(data,cor=TRUE) - It will use correlation
刪除:d命令$ sed '2d' example-----刪除example檔案的第二行。 $ sed '2,$d' example-----刪除example檔案的第二行到末尾所有行。 $ sed '$d' example-----刪除example檔案的最後一行。 $ sed '/test/'d example-----刪除example檔案所有包含test的行。 替換:s命令$ sed 's/test/mytest/g'
R中處理一些序列1 篩選列表中特定的行==============================================================a <- data.frame(t1 = c('A','B','C','D','E','F','G'),t2 = rep(2, 7), t3 = 1:7 )a t1 t2 t31 A 2 12 B 2 23 C 2 34 D 2 45 E 2 56 F 2 67 G 2 7b <-
http://en.wikipedia.org/wiki/Method_of_Four_Russians In computer science, the Method of Four Russians is a technique for speeding up algorithms involving Boolean matrices, or more generally algorithms involving matrices in which each cell may take
串列口中有兩個緩衝寄存器SBUF,一個是發送寄存器,一個是接收寄存器,在物理結構上是完全獨立的。它們都是位元組定址的寄存器,位元組地址均為99H。這個重疊的地址靠讀/寫指令區分:串列發送時,CPU向SBUF寫入資料,此時99H表示發送SBUF;串列接收時,CPU從SBUF讀出資料,此時99H表示接收SBUF。 單片機串口 #include <reg52.h>#include <absacc.h> #define unit unsigned int
裡氏置換原則(Liskov Substitution Principle),簡稱LSP定義:Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing
public class domParse { public domParse(){ DocumentBuilderFactory domfac=DocumentBuilderFactory.newInstance(); try { DocumentBuilder dombuilder=domfac.newDocumentBuilder(); InputStream is=new