[R] princomp/biplot

Nair, Murlidharan T mnair at iusb.edu
Sun Sep 3 14:44:47 CEST 2006


Here is part of the data I am looking at I searched for NA and NaN values and did not find any.
 
unique.data<-structure(list(TargetID = structure(c(5, 4, 9, 7, 1, 2, 3, 10, 
6, 8), .Label = c("BGN-1274", "CES1-0939", "CES1-0942", "CLU-0191", 
"CLU-0196", "DRR1-0754", "EPB41-1096", "FASN-1433", "FGFR2-0101", 
"IGSF4-0725"), class = "factor"), Tumor_50_5 = c(24472.28668, 
14927.30306, 4603.214232, 20353.89504, 10800.10031, 8334.506698, 
12935.86589, 18670.69279, 1834.285319, 8061.017148), Tumor_50_5.1 = c(24694.74653, 
16332.21311, 3026.771736, 19711.89242, 9702.909104, 7527.209484, 
13623.2929, 16251.16879, 1101.827804, 7941.266099), Normal_44 = c(17722.98964, 
9847.459893, 4355.325012, 11987.45188, 6749.556025, 6670.343296, 
18217.32106, 11840.09384, 2637.562385, 2897.246729), Normal_44.1 = c(16906.49727, 
10366.3652, 4664.205184, 13010.55209, 5927.638183, 8580.823581, 
17751.28597, 12749.67995, 2865.991941, 2181.529494), Tumor_70_147 = c(3278.127988, 
1840.267195, 668.2195907, 26654.84126, 11859.62749, 1235.222232, 
5953.22946, 20211.21168, 436.3739766, 9346.450426), Tumor_70_147.1 = c(3302.086188, 
1762.572781, 520.8580179, 26857.4145, 12101.58688, 1247.985431, 
4649.722104, 21520.61196, 810.8623424, 7742.528151), Tumor_70_174 = c(8953.042083, 
4680.937373, 868.4611171, 17589.24888, 13761.53356, 3561.61069, 
10889.29719, 18580.46789, 694.8298796, 7034.296512), Tumor_70_174.1 = c(8785.048314, 
5105.333464, 834.0581933, 17740.60095, 13545.72116, 2974.066553, 
11710.38837, 17029.91958, 851.6388904, 8336.363559), Normal_201 = c(13209.97704, 
5987.558991, 4925.912486, 19035.29531, 8877.366633, 3627.623935, 
13091.06176, 17120.43797, 1393.432353, 992.862678), Normal_201.1 = c(12956.36969, 
6957.632081, 4170.711469, 19436.27011, 7488.596222, 3758.197226, 
14258.70552, 15733.29592, 1333.489392, 2644.183317), Tumor_60_21 = c(9119.076822, 
5424.122627, 2729.085504, 20266.57245, 8175.101635, 6707.572283, 
15383.23941, 18514.51632, 3493.213231, 7212.572147), Tumor_60_21.1 = c(9642.858134, 
5482.593811, 3214.152504, 20381.74091, 7681.749628, 7021.018807, 
14560.42309, 17373.35222, 3083.209781, 8084.917274), Normal_46 = c(14977.87599, 
9553.68047, 4699.713431, 16688.94485, 7479.164014, 9391.987572, 
20236.49557, 13428.83993, 3073.093289, 2633.839836), Normal_46.1 = c(16912.53903, 
8222.321115, 5635.427184, 16668.26626, 9137.175471, 8782.531138, 
21818.68236, 12549.00461, 3163.267961, 2274.174218), Normal_148 = c(15082.8995, 
9914.330671, 2888.589499, 17334.89075, 11699.33778, 8702.306051, 
18436.21715, 12974.84012, 2396.640619, 3601.794474), Normal_148.1 = c(17164.53905, 
10458.76035, 2931.573467, 16093.02971, 10021.50548, 4340.399394, 
16816.04525, 13363.93656, 1818.554592, 5187.103679), Tumor_40_177 = c(11958.54077, 
7057.503614, 4858.98125, 14072.54279, 7228.055277, 8058.988591, 
17254.88914, 14533.74148, 3795.679037, 1960.184449), Tumor_40_177.1 = c(14342.34045, 
7043.882552, 5339.987356, 13434.18696, 7775.267671, 7870.574924, 
15709.66122, 14501.01108, 3135.631252, 2779.670904), Normal_196 = c(12268.70303, 
6822.82457, 3430.226128, 15069.9473, 6847.04561, 7603.957287, 
17434.3659, 14678.38995, 3128.989625, 4107.31109), Normal_196.1 = c(13217.37087, 
6603.63231, 3729.266628, 18720.92104, 8377.203613, 8204.241858, 
20083.21434, 15659.35316, 3143.702381, 3234.881929), Tumor_90_202 = c(10448.33092, 
5622.300331, 2602.578141, 23267.11533, 10894.25795, 3164.504413, 
13420.02824, 16470.94781, 1237.868083, 4305.943142), Tumor_90_202.1 = c(12007.05258, 
4173.245287, 1692.14977, 21977.2182, 10268.23279, 2720.971526, 
11929.71067, 17392.77126, 1055.695487, 3900.654748), Normal_22 = c(14727.02707, 
8613.463608, 4520.130357, 17173.11101, 8281.605012, 6869.527442, 
17604.37338, 14543.36345, 3481.023924, 3593.483199), Normal_22.1 = c(12358.47478, 
7393.050914, 4602.829435, 17294.64275, 9111.618581, 7958.214148, 
15552.31912, 13486.77236, 3059.020875, 4655.274728), Normal_121 = c(13617.79644, 
6916.599185, 6734.349423, 15520.9982, 6011.986779, 7281.902116, 
15190.11366, 13322.95415, 2944.596165, 3743.452326), Normal_121.1 = c(14235.29538, 
7957.407174, 4885.430125, 14009.38995, 6373.165212, 7457.273646, 
14866.5746, 13661.51522, 3621.556214, 4363.737452), Normal_155 = c(14855.68181, 
9721.884441, 3369.152739, 16304.03935, 7522.683416, 7597.04418, 
16292.26537, 14041.3317, 1971.238228, 2586.866619), Normal_155.1 = c(15552.13585, 
9886.682712, 3934.632995, 14075.41372, 7455.163957, 6732.60801, 
15313.37004, 13835.98717, 2654.247033, 3198.654039), Tumor_70_189 = c(11487.07368, 
6104.197796, 363.4218849, 24258.67147, 11967.93369, 2493.534501, 
6588.234571, 8381.475617, 1174.815972, 2398.754423), Tumor_70_189.1 = c(11315.73069, 
7122.757874, 594.2384845, 22518.91339, 11272.67261, 1750.295429, 
7990.200557, 9529.124932, 349.4853029, 1590.842831), Tumor_95_197 = c(10154.19749, 
5496.516306, 318.3023324, 22587.84221, 11248.17799, 3016.333383, 
13060.78465, 20922.22061, 1068.696278, 2472.143693), Tumor_95_197.1 = c(10165.06933, 
6639.023708, 376.4619469, 24990.34567, 12562.08115, 3187.349827, 
12307.80303, 20779.99055, 1528.202321, 2564.929166), Tumor_80_204 = c(11417.25194, 
6992.472687, 2743.618114, 22253.30159, 9490.236273, 3821.5234, 
10974.28451, 15290.12188, 952.8203566, 7181.712809), Tumor_80_204.1 = c(11051.7521, 
5288.909975, 2134.634229, 19815.83464, 10435.51024, 1820.467531, 
11419.71779, 13071.72718, 841.5077374, 8431.494196), Normal_30 = c(13297.02158, 
8500.60518, 5069.140899, 19267.91717, 7780.128587, 8993.584733, 
16493.68202, 18095.89001, 2163.938379, 3872.419352), Normal_30.1 = c(13131.55032, 
7514.89843, 5392.00687, 18689.94053, 7418.376584, 7372.264729, 
12894.74179, 17888.42555, 3145.188571, 3559.457417), Normal_133 = c(15902.03785, 
9071.49091, 2194.626729, 13260.94608, 5571.456125, 13558.9189, 
24557.70389, 14873.38379, 5388.67985, 1993.675897), Normal_133.1 = c(14670.27339, 
9728.760275, 2885.095244, 12833.73823, 5989.897654, 11462.32301, 
22748.38048, 15255.67871, 4363.923499, 1955.846897), Tumor_80_167 = c(11439.36157, 
6228.122019, 2692.045314, 20691.32938, 9891.626221, 8729.717239, 
15545.38006, 19142.44432, 2204.506388, 4003.571549), Tumor_80_167.1 = c(10825.26696, 
5427.656524, 1263.104694, 19959.42376, 9652.942183, 8939.622442, 
16169.75522, 19342.73556, 2011.907997, 4656.370956), Tumor_50_192 = c(10913.85735, 
6324.805237, 2507.744772, 18199.45954, 8972.689135, 6472.622133, 
15066.10139, 16956.34253, 2008.115437, 7163.356898), Tumor_50_192.1 = c(12767.91983, 
5963.186631, 2478.20368, 18487.16846, 9013.104829, 5651.851795, 
13018.48653, 15154.98893, 1585.007661, 5885.536464), Tumor_65_198 = c(9594.249395, 
4856.045923, 1135.982305, 25645.99738, 14005.89222, 1653.380607, 
7129.672901, 17964.53461, 1428.551544, 5444.654951), Tumor_65_198.1 = c(7551.650445, 
4523.688987, 999.1185369, 23825.1397, 12264.90773, 915.536689, 
4511.027484, 16627.71506, 1663.709113, 5311.319382)), .Names = c("TargetID", 
"Tumor_50_5", "Tumor_50_5.1", "Normal_44", "Normal_44.1", "Tumor_70_147", 
"Tumor_70_147.1", "Tumor_70_174", "Tumor_70_174.1", "Normal_201", 
"Normal_201.1", "Tumor_60_21", "Tumor_60_21.1", "Normal_46", 
"Normal_46.1", "Normal_148", "Normal_148.1", "Tumor_40_177", 
"Tumor_40_177.1", "Normal_196", "Normal_196.1", "Tumor_90_202", 
"Tumor_90_202.1", "Normal_22", "Normal_22.1", "Normal_121", "Normal_121.1", 
"Normal_155", "Normal_155.1", "Tumor_70_189", "Tumor_70_189.1", 
"Tumor_95_197", "Tumor_95_197.1", "Tumor_80_204", "Tumor_80_204.1", 
"Normal_30", "Normal_30.1", "Normal_133", "Normal_133.1", "Tumor_80_167", 
"Tumor_80_167.1", "Tumor_50_192", "Tumor_50_192.1", "Tumor_65_198", 
"Tumor_65_198.1"), class = "data.frame", row.names = c("1", "2", 
"3", "4", "5", "6", "7", "8", "9", "10"))
pc<-princomp(t(unique.data))
biplot(pc,xlabs=rep("",nrows(t(unique.data))))

________________________________

From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
Sent: Sun 9/3/2006 2:40 AM
To: Rick Bischoff
Cc: Nair, Murlidharan T; r-help at stat.math.ethz.ch
Subject: Re: [R] princomp/biplot



On Sat, 2 Sep 2006, Rick Bischoff wrote:

> Infinite values?

Or NA or NaN values

> On Sep 2, 2006, at 3:48 PM, Nair, Murlidharan T wrote:
>
> > I am getting the following error when I an trying to use princomp
> > princomp(unique.data)
> > Error in cov.wt(z) : 'x' must contain finite values only
> >
> > What do I look for?

--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list