请注意:我可以使用SAS或R来获得所需的结果。如果您不知道如何使用SAS,我将在后续文章中提供R的数据和信息。
这是在SAS中创建的简单示例数据集,显示了我所面临的条件:
data df;
format x best12.;
do i=1 to 30;
x=.M;
output;
end;
do i=1 to 200;
x=.;
output;
end;
do i=1 to 1000;
y=ranuni(1)*1000+1;
x=put(y,8.4);
output;
end;
keep x;
run;
如您所见,缺少“。”值。和'.M'。如果我制作一个直方图,所有这些值似乎都被排除在直方图中。但是,它们的存在在报告中可见。
ods listing;
proc univariate data=Df;
var x;
histogram;
run;
ods listing close;
运行此proc univariate
时,我有几页报告,然后是直方图。如以下图像所示,找到了相关信息:
期望的结果是将这些丢失的值包括在直方图图像上。在我的实际用法中,我将为200多个变量准备直方图,并且在每个图像的单个图像上包含所有必需的信息将比滚动浏览数百页的报表有用得多。
这是我想要的结果的一个例子。但是,如果无法将丢失的百分比直接添加到直方图栏中,我会希望将丢失的百分比列为图像中的文本。
在SAS中有没有办法做到这一点?额外的长条实际上应该影响此直方图的百分比,因此,如果缺少80%的值,则该长条将比其他带有数字的长条大。
如果没有,也许在R中是可能的。将数据导出到R中相对来说是微不足道的。因此,假设此处提供相同的数据:
structure(list(x = structure(c("M", "M", "M", "M", "M", "M",
"M", "M", "M", "M", "M", "M", "M", "M", "M", "M", "M", "M", "M",
"M", "M", "M", "M", "M", "M", "M", "M", "M", "M", "M", NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, "185.9626", "971.0887", "400.8243", "260.3986",
"922.6026", "970.2773", "543.9792", "532.6917", "50.794", "67.5666",
"820.3186", "524.8705", "854.3943", "68.1846", "958.0239", "298.194",
"273.6118", "690.9296", "977.7649", "227.5075", "689.2366", "413.7639",
"559.5541", "288.2256", "476.7893", "845.987", "635.5241", "591.3647",
"583.5815", "378.0134", "729.3616", "507.6035", "932.2136", "930.12",
"590.6603", "298.2228", "392.0424", "473.4292", "680.5257", "169.0884",
"167.5261", "872.1049", "299.7895", "935.6418", "901.4708", "569.7835",
"50.5457", "136.5883", "512.3179", "434.2046", "177.1058", "666.036",
"405.8187", "125.5488", "454.4868", "200.5531", "575.8372", "739.474",
"440.8122", "50.367", "523.3822", "344.3653", "23.7123", "713.8879",
"938.0646", "446.9931", "947.9372", "713.8987", "104.2727", "176.172",
"269.9059", "615.8565", "421.7076", "72.7371", "359.4938", "712.4349",
"190.8499", "148.9664", "562.8355", "271.1087", "326.1991", "570.1784",
"43.5944", "440.2106", "918.4351", "526.8418", "732.816", "906.2236",
"577.0038", "188.9431", "332.326", "699.8738", "122.5631", "181.6658",
"271.6393", "654.2119", "422.3725", "38.9777", "271.8063", "428.7339",
"821.1031", "844.4531", "877.9101", "268.22", "307.0246", "398.0483",
"350.0518", "766.9348", "544.4015", "613.5734", "553.913", "736.9083",
"372.8579", "646.6469", "558.1772", "876.0427", "572.2385", "757.7711",
"149.4293", "26.437", "818.2168", "659.2194", "30.4726", "854.3927",
"363.8533", "378.3175", "511.5414", "712.9408", "376.3303", "230.5369",
"687.2141", "553.4322", "582.8184", "175.7225", "47.0957", "644.7989",
"646.4478", "94.1665", "621.0778", "79.4527", "690.2577", "185.02",
"621.4688", "194.4664", "296.323", "632.003", "385.8154", "687.4354",
"492.9653", "830.9891", "45.3908", "204.4657", "79.9962", "146.1177",
"225.4361", "348.5495", "703.1268", "492.4519", "632.3485", "907.3614",
"305.0696", "926.8537", "441.649", "609.3854", "782.9232", "427.3273",
"126.2918", "741.4407", "195.8032", "817.7258", "86.4755", "184.7618",
"333.636", "706.581", "928.611", "297.4189", "225.0418", "148.189",
"591.641", "464.2575", "419.599", "257.3096", "231.4521", "81.3435",
"436.5923", "671.1953", "423.7238", "499.2745", "856.4391", "601.0225",
"513.2634", "596.8914", "45.0338", "517.9692", "689.8435", "454.3286",
"836.6544", "298.4456", "404.2475", "957.8356", "422.9367", "781.7931",
"332.0596", "173.1015", "911.5578", "269.9737", "957.0176", "138.199",
"272.9045", "557.9157", "659.248", "685.6502", "15.3484", "768.6924",
"609.2854", "538.7332", "21.1416", "645.6661", "965.0621", "181.5664",
"602.0622", "973.7504", "352.1731", "153.7375", "666.7509", "63.3307",
"582.9058", "707.2334", "425.7658", "53.6991", "486.482", "939.8279",
"644.7048", "536.67", "635.2019", "308.0852", "222.2622", "558.3752",
"607.3624", "602.1178", "36.9078", "799.3215", "386.7776", "782.2929",
"271.7681", "203.2705", "755.7987", "452.5837", "373.1987", "405.6169",
"779.4035", "304.9959", "906.9386", "308.2276", "621.2043", "755.556",
"504.0589", "429.6581", "767.2686", "991.1561", "572.7591", "801.0568",
"512.9949", "201.699", "947.3559", "811.6579", "291.8313", "312.0987",
"519.8151", "800.8539", "516.8318", "958.9357", "476.1095", "949.7048",
"640.9645", "484.0937", "651.5747", "520.2282", "234.8962", "900.3894",
"693.1371", "427.9634", "147.0431", "226.1329", "199.6782", "773.3236",
"991.8145", "351.7495", "454.3664", "283.0351", "70.4709", "541.2402",
"199.2659", "41.8104", "686.3233", "924.3151", "438.8517", "240.3994",
"209.1992", "57.8957", "471.0023", "676.4539", "669.0446", "813.0324",
"188.8539", "912.9967", "946.0608", "357.5811", "645.5963", "752.5301",
"229.098", "946.4856", "443.8694", "653.635", "861.5289", "654.633",
"547.9526", "217.6461", "385.6536", "702.7005", "288.3574", "276.5411",
"948.4602", "702.3759", "787.7155", "860.4903", "809.5756", "214.9675",
"888.5069", "977.8302", "724.182", "640.4782", "755.1235", "159.4327",
"210.0291", "552.827", "972.9385", "568.8218", "182.943", "199.0987",
"739.394", "957.0497", "399.1318", "287.5669", "228.5352", "763.5288",
"362.8183", "15.7433", "421.8691", "10.7537", "168.9205", "576.1645",
"941.8231", "414.2527", "964.6047", "823.6905", "29.808", "731.8761",
"453.8193", "338.6814", "979.1373", "982.4637", "493.9553", "404.8051",
"953.978", "680.9686", "6.0802", "10.6348", "178.2355", "640.8735",
"988.9237", "94.2299", "455.3864", "995.2248", "795.0074", "697.7844",
"180.0715", "760.4194", "178.7672", "364.7651", "622.3498", "71.2859",
"915.1567", "841.2615", "938.6384", "642.8329", "109.7501", "11.212",
"791.8081", "228.004", "608.2395", "647.5117", "244.3697", "857.0005",
"457.1681", "46.0384", "166.0815", "63.19", "235.6531", "974.1699",
"126.7906", "444.7151", "9.7581", "430.7482", "791.3288", "157.1319",
"87.8969", "499.7956", "654.765", "27.4485", "124.4274", "4.3653",
"974.2801", "84.3725", "290.0972", "210.3595", "766.8113", "476.8953",
"893.7874", "352.6818", "212.391", "485.9383", "123.0042", "821.0203",
"875.4745", "852.0494", "510.9897", "742.9106", "419.6393", "605.3322",
"495.4695", "463.7911", "990.863", "356.8746", "412.0952", "97.3777",
"803.3194", "460.8084", "108.5638", "55.5635", "566.3803", "412.8094",
"814.7781", "118.7314", "994.6653", "295.9439", "969.3008", "469.6288",
"145.148", "702.3593", "461.5773", "779.0193", "670.6038", "284.8408",
"659.042", "810.1945", "118.3677", "274.2438", "295.2056", "993.7999",
"973.448", "902.9239", "413.2769", "379.2431", "680.7533", "394.9922",
"945.6788", "624.722", "406.4948", "465.636", "230.8293", "510.3886",
"728.458", "443.88", "194.1945", "54.8419", "267.4354", "340.8108",
"66.5481", "165.8289", "72.0559", "500.3151", "302.1719", "609.7822",
"318.0166", "505.3297", "790.9808", "496.3614", "914.392", "408.3293",
"629.7713", "987.2263", "342.2658", "116.7494", "999.7048", "473.2114",
"379.8607", "270.948", "131.3105", "317.3986", "89.4428", "475.1982",
"62.21", "340.5318", "724.8074", "89.0325", "724.8313", "813.228",
"767.4524", "597.1436", "327.7372", "476.632", "733.4944", "538.8605",
"557.6343", "818.9034", "553.3628", "789.9897", "16.913", "425.8398",
"727.8405", "19.1406", "830.4988", "638.3202", "949.3691", "280.7647",
"635.6984", "515.8156", "439.0264", "837.2173", "995.6913", "916.9842",
"192.3891", "791.1708", "936.1215", "127.3613", "131.1873", "457.531",
"504.508", "545.5348", "158.1025", "145.0966", "742.9074", "269.6511",
"390.9124", "492.4721", "180.8201", "112.5", "670.2907", "94.9885",
"681.6701", "556.6188", "942.8924", "91.1424", "925.7007", "390.9405",
"684.2877", "611.2362", "336.2536", "690.5464", "805.3683", "270.2932",
"273.9049", "189.531", "542.1381", "32.4074", "910.9336", "118.0686",
"388.5666", "646.223", "655.7028", "990.4283", "682.1596", "967.8979",
"503.9537", "615.232", "808.0248", "57.3946", "399.9911", "508.6546",
"735.0188", "336.7563", "438.7867", "864.155", "628.043", "577.7379",
"796.0536", "820.6869", "322.1132", "639.6276", "292.0172", "658.6991",
"918.1194", "257.8712", "275.6201", "42.5074", "949.5604", "696.918",
"54.2326", "952.3529", "282.2365", "350.4344", "158.6643", "924.6886",
"60.4696", "890.7313", "82.1267", "121.1292", "565.9524", "516.4049",
"494.4737", "782.6651", "823.7738", "75.6671", "299.9372", "808.6502",
"730.0349", "643.716", "334.6902", "277.428", "994.2802", "939.4066",
"562.6745", "185.8866", "784.9558", "131.809", "134.8747", "247.8866",
"978.3516", "695.5582", "530.7795", "239.7878", "333.9312", "693.1315",
"998.9222", "518.1969", "142.8932", "964.7987", "305.4655", "138.3047",
"538.6714", "632.4899", "364.6074", "76.6572", "391.1019", "607.2232",
"347.1533", "246.5421", "700.8786", "845.9716", "813.5647", "937.0058",
"994.8333", "508.4189", "802.4961", "689.9831", "353.0825", "694.6961",
"603.4495", "542.9621", "611.002", "932.0611", "810.3", "972.0262",
"646.4119", "884.5466", "392.2544", "823.1692", "426.8816", "607.1",
"938.4085", "558.9458", "776.486", "159.9047", "970.0521", "876.7853",
"886.0768", "223.7484", "987.9194", "106.3544", "288.8817", "321.134",
"619.9767", "475.6006", "918.0446", "401.5002", "904.1853", "646.4752",
"944.4168", "756.6958", "930.5543", "48.6663", "341.664", "965.2013",
"296.7024", "533.8722", "649.5287", "355.4043", "9.1982", "38.2914",
"316.0813", "418.5179", "780.7503", "696.0666", "798.3291", "150.4867",
"729.2404", "675.4917", "689.9732", "662.3665", "420.2621", "755.2172",
"344.2887", "709.5542", "983.5345", "33.0365", "226.9772", "344.7762",
"422.4038", "663.4982", "92.0537", "44.7676", "947.6471", "650.9532",
"279.0353", "424.3423", "402.5659", "133.1801", "35.2343", "282.782",
"64.1469", "623.3967", "690.6633", "284.0618", "469.2275", "991.9513",
"828.4532", "472.1298", "658.0149", "471.4351", "634.7074", "809.3303",
"327.1528", "323.698", "152.0059", "21.5413", "712.5852", "703.8751",
"175.2252", "651.1252", "781.6538", "657.5007", "698.0728", "661.9578",
"616.3443", "782.7727", "344.3334", "116.2572", "500.237", "166.4211",
"496.9333", "192.2514", "47.98", "664.1206", "497.4444", "271.2836",
"336.6008", "233.7287", "849.0963", "278.1842", "121.9383", "423.5104",
"655.7927", "14.5324", "308.7161", "50.1885", "412.4437", "992.889",
"800.3944", "186.7711", "487.0814", "245.414", "407.8053", "786.8064",
"642.9563", "635.8652", "610.5934", "33.4489", "90.8328", "526.5662",
"237.364", "96.3168", "568.4725", "724.7312", "982.5129", "129.329",
"179.7677", "167.8462", "685.4671", "577.9849", "953.633", "316.0254",
"713.1554", "549.5741", "970.0241", "709.0122", "686.0794", "818.9696",
"952.6099", "862.8962", "18.3049", "962.0972", "950.6321", "646.8501",
"622.1503", "395.1015", "892.3881", "702.5592", "378.5131", "432.9628",
"648.5462", "194.7267", "135.2709", "160.1734", "760.7965", "428.7074",
"924.5702", "749.6376", "868.7443", "564.2507", "376.4343", "441.5547",
"839.3707", "117.1167", "7.1011", "306.6166", "3.397", "839.7049",
"105.3713", "195.6873", "396.5144", "941.2713", "502.8532", "909.3083",
"415.5281", "676.3949", "246.785", "841.9609", "850.8536", "770.0396",
"605.022", "193.8714", "297.5457", "626.0234", "877.8313", "365.2988",
"407.11", "543.7302", "121.795", "764.0918", "11.979", "67.6425",
"18.4728", "409.0951", "389.4057", "735.3737", "183.4104", "805.6381",
"954.6486", "790.5828", "22.5228", "760.1009", "971.9821", "460.9531",
"401.5527", "653.4836", "790.2295", "932.82", "66.7457", "680.4396",
"701.1791", "759.1867", "587.2498", "170.6856", "711.3639", "650.1843",
"43.1462", "458.4786", "905.54", "240.3128", "604.3034", "31.3091",
"541.1093", "757.7448", "591.293", "659.1233", "754.5859", "368.8301",
"796.6814", "373.8775", "176.7159", "552.9335", "410.3892", "41.615",
"814.5713", "733.1952", "971.9638", "929.6915", "98.5514", "371.08",
"487.3651", "674.5217", "709.6539", "961.4552", "402.9765", "218.9928",
"662.4137", "140.6063", "357.3221", "955.983", "784.804", "558.1331",
"487.5895", "696.3418", "4.9448", "868.3812", "260.5816", "820.0505",
"839.5843", "708.0438", "820.6154", "116.5226", "124.4367", "255.7617",
"748.5931", "570.4943", "263.0048", "261.9168", "313.8063", "60.3583",
"728.2438", "233.206", "543.423", "857.3499", "533.4335", "707.2373",
"567.0104", "329.2016", "390.2727", "978.6919", "12.2579", "902.5805",
"645.8404", "194.7968", "268.1894", "439.1287", "924.3094", "883.4786",
"542.8591", "943.1775", "401.9489", "686.0916", "833.7638", "644.0075",
"885.367", "390.6116", "395.6609", "502.7026", "426.2273", "318.2967",
"728.6603", "217.3236", "228.5971", "301.0794", "768.3377", "75.51",
"494.3128", "226.8128", "787.7257", "187.4007", "60.4328", "351.4584",
"64.7187", "18.5175", "133.1031", "752.4957", "656.1083", "130.069",
"8.4988", "368.194", "885.7056", "709.7175", "571.7867", "153.7275",
"34.6657", "690.2913", "951.7159", "346.8914", "128.868", "85.2696"
), format.sas = "BEST")), label = "DF ", row.names = c(NA,
-1230L), class = c("tbl_df", "tbl", "data.frame"))
使用hist(as.numeric(df$x))
得到一个直方图,其“ M”值更改为NA。我认为这些和NA值在制作直方图时会被丢弃。
R中是否可以制作直方图,但包含NA和M值的条形?我知道我可以对其进行“计数”并将其作为注释,但是如果遇到将数据导出到R的麻烦,那么我希望能够将其可视化为直方图的条形图。
在我的真实数据集中,我有以下详细信息:
The CONTENTS Procedure
Data Set Name INLIB.PRODUCTION Observations 119081
Member Type DATA Variables 223
Engine V9 Indexes 0
Created 02/14/2015 19:27:29 Observation Length 1790
Last Modified 02/14/2015 19:27:29 Deleted Observations 0
Protection Compressed CHAR
Data Set Type Reuse Space NO
Label Point to Observations YES
Data Representation WINDOWS_32 Sorted NO
Encoding wlatin2 Central Europe (Windows)
Engine/Host Dependent Information
Data Set Page Size 16384
Number of Data Set Pages 7759
Number of Data Set Repairs 0
Filename --\data\production.sas7bdat
Release Created 9.0202M3
Host Created W32_VSPRO
Owner Name --
File Size 121MB
File Size (bytes) 127124480
还有一些变量名:
Alphabetic List of Variables and Attributes
# Variable Type Len Label
209 act12_n_arrears Num 8 Customer number in arrears on all
loans during the last 12 months
210 act12_n_arrears_ Num 8 Customer number of days greter than 15
days on all loans during the last 12 months
211 act12_n_good_days Num 8 Customer number of days lower than 15
on all loans during the last 12 months
92 act3_n_arrears Num 8 Customer number in arrears on all
loans during the last 3 months
93 act3_n_arrears_ Num 8 Customer number of days greter than 15
days on all loans during the last 3 months
94 act3_n_good_days Num 8 Customer number of days lower than 15
on all loans during the last 3 months
131 act6_n_arrears Num 8 Customer number in arrears on all
loans during the last 6 months
132 act6_n_arrears_ Num 8 Customer number of days greter than 15
days on all loans during the last 6 months
133 act6_n_good_days Num 8 Customer number of days lower than 15
on all loans during the last 6 months
答案 0 :(得分:2)
SGPLOT
VBAR
语句具有一个MISSING
选项,该选项将导致缺少的值成为有效的类别并为它们显示一个条形。不幸的是,当类别数据包含多个缺失版本(您的.
和.M
)时,条形图是 stacked 而不是 discrete 。一种补救方法是使用自定义格式和数据视图将缺少的值预先呈现为所需的类别值。
示例代码:
data have;
question = '1A';
do response = ., .M, 1 to 10;
do _n_ = 1 to 25 * ranuni(123);
surveyID + 1;
output;
end;
end;
run;
ods graphics / width=320px;
proc sgplot data=have;
vbar response / missing;
run;
补救措施
格式定义. = "A0"x'.'
使用非典型字符串构造来定义缺失值表示形式。 A0十六进制字符是一个不间断的空格,将在7位ASCII字符后进行排序。
proc format;
value missSep
. = "A0"x'.'
.M = "A0"x'.M'
;
run;
data vbarData / view=vbarData;
set have;
responseX = put(response,missSep.);
run;
proc sgplot data=vbarData;
vbar responseX;
run;
答案 1 :(得分:2)
SGPANEL
可以为每个变量创建输出,但是将需要一些数据操作才能获取诸如PANELBY
和INSET
之类的语句所需的数据列。直方图会忽略缺失值,并根据分布计算直方图bin。为缺失的值添加“虚拟替换值”,以使它们最终出现在直方图中会弄乱分布-因此请不要那样做。一种有用的方法是在输出中有一个小的频率表,列出缺失值及其计数。
样本数据:
生成的样本数据有1000条记录和200个指标(我称它们为事实)
data have;
do observationId = 1 to 1000;
array fact fact1-fact200;
do _n_ = 1 to dim(fact);
fact[_n_] = round(_n_ * 100 + rannor(123),0.01);
if ranuni(123) < 0.015 then fact[_n_] = .;
else
if ranuni(123) < 0.015 then fact[_n_] = .M;
end;
output;
end;
run;
示例代码:
代码需要执行几个步骤才能将数据转换为适合Proc SGPANEL
的形状(和内容)
Transpose
按行,因此可以使用BY
语句处理200个变量varOrder
以在BY
处理期间维持原始数据集的列顺序PUT
计算缺失值的输出表示形式varOrder
排序,因此每个分组都包含相应原始列的值FREQ
计算每个组中每个缺失值表示的数量SGPANEL
所需的布局INSET
SGPANEL
步骤来生成图形代码
* pivot data into categorical form for by processing;
proc transpose data=have out=haveByFact(rename=col1=fact);
by observationId;
var fact:;
run;
* track ordering and missing representation;
data haveByFact2;
set haveByFact;
by observationId;
if first.observationId then varOrder=1; else varOrder+1;
if missing(fact) then missingRender = put(fact, best12.);
run;
* sort for by group processing;
proc sort data=haveByFact2 out=haveByFact3;
by varOrder;
run;
* count missings;
proc freq noprint data=haveByFact3;
by varOrder _name_;
table missingRender / out=missFreq(keep=VarOrder missingRender Count) ;
where missing(fact);
run;
* arrange missings counts for merging and later INSET use;
proc transpose data=missFreq prefix=missingv_ out=missFreqT(keep=varOrder missingv_:);
by varOrder;
id missingRender;
idlabel missingRender;
var count;
run;
* merge missings counts with original data;
data haveByFact4;
merge haveByFact3(drop=missingRender) missFreqT;
by varOrder;
run;
* SGPANEL Ho! ;
options nobyline;
proc sgpanel data=haveByFact4;
by varorder _name_;
title "Distribution of response #BYVAL2";
panelby _name_
/ noheader
proportional
uniscale=row
;
histogram fact
/ scale = count
;
colaxis display=(nolabel);
inset missingV_: / title="Missing Freq";
where varOrder in (8,9,10);
run;
样本输出
答案 2 :(得分:1)
我在代码中做了一些更改,基本上创建了另一个用于分组的变量“ y”,请参见下面的代码-
data Miss1 Rest;
length y $15.;
set df;
if x=. then
do;
y='Missing(.)';
output Miss1;
end;
else
do;
y='Other';
output Rest;
end;
run;
data Rest1;
length y $15.;
set rest;
if missing(x) then
do;
y='Missing(.M)';
end;
run;
data df_new;
set Miss1 Rest1;
run;
proc gchart data=df_new;
vbar x/missing levels=all type=PCT subgroup=y;
run;
quit;
我现在正在获取图表,希望对您有所帮助] 1
/*Using Discrete option and macro for footnote*/
%macro gchart(var);
proc gchart data=test;
footnote &var;
vbar &var/missing levels=all type=PCT discrete; /*or hbar &var/missing levels=all type=PCT discrete;*/
run;
quit;
%mend gchart;
%gchart(x);