Dear all,
This is similar to what I posted before, but please accept my apology if this was posted somewhere in this forum.
I have a mtrix
I want to replace the column names with the values in this variable. For example, the name of column 1 will be Appleton, the name of colun 2 will be Beechwood
I tried this code but didn't work.
.
My data is as follows.
Any help would be appreciated.
Kind regards,
Kim
This is similar to what I posted before, but please accept my apology if this was posted somewhere in this forum.
I have a mtrix
Code:
mat A= J(1,216,1) mat list A
I want to replace the column names with the values in this variable. For example, the name of column 1 will be Appleton, the name of colun 2 will be Beechwood
I tried this code but didn't work.
Code:
foreach j=1/216 { local var= geography_1[`j'] matrix colnames A= `var' }
My data is as follows.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str12 geography_1 "Appleton" "Beechwood" "Birchfield" "Broadheath" "Daresbury" "Ditton" "Farnworth" "Grange" "Hale" "HaltonBrook" "HaltonCastle" "HaltonLea" "HaltonView" "Heath" "HoughGreen" "Kingsway" "Mersey" "NortonNorth" "NortonSouth" "Riverside" "WindmillHill" "Appleton" "BewseyandWhi" "Birchwood" "Burtonwoodan" "Culcheth,Gla" "Fairfieldand" "Grappenhalla" "GreatSankeyN" "GreatSankeyS" "Hatton,Stret" "LatchfordEas" "LatchfordWes" "Lymm" "Orford" "PenkethandCu" "PoplarsandHu" "PoultonNorth" "PoultonSouth" "RixtonandWoo" "StocktonHeat" "Westbrook" "WhittleHall" "Anfield" "BelleVale" "Central" "Childwall" "Church" "Clubmoor" "County" "Cressington" "Croxteth" "Everton" "Fazakerley" "Greenbank" "Kensingtonan" "Kirkdale" "KnottyAsh" "MossleyHill" "NorrisGreen" "OldSwan" "Picton" "PrincesPark" "Riverside" "Speke-Garsto" "StMichael's" "TuebrookandS" "Warbreck" "Wavertree" "WestDerby" "Woolton" "YewTree" "Arboretum" "Blagreaves" "Boulton" "Chaddesden" "Chellaston" "Darley" "Derwent" "Littleover" "Mackworth" "Mickleover" "Normanton" "Oakwood" "Sinfin" "Spondon" "Abbey" "Aylestone" "BeaumontLeys" "Belgrave" "BraunstonePa" "Castle" "Charnwood" "Coleman" "Evington" "EyresMonsell" "Fosse" "Freemen" "Humberstonea" "Knighton" "Latimer" "NewParks" "RusheyMead" "SpinneyHills" "Stoneygate" "Thurncourt" "Westcotes" "WesternPark" "Arboretum" "Aspley" "Basford" "Berridge" "Bestwood" "Bilborough" "Bridge" "Bulwell" "BulwellFores" "CliftonNorth" "CliftonSouth" "Dales" "DunkirkandLe" "LeenValley" "Mapperley" "RadfordandPa" "Sherwood" "StAnn's" "WollatonEast" "WollatonWest" "AbbeyHultona" "Baddeley,Mil" "BentileeandU" "BirchesHeada" "BlurtonEast" "BlurtonWesta" "BoothenandOa" "BradeleyandC" "BroadwayandL" "BurslemCentr" "BurslemPark" "DresdenandFl" "EatonPark" "EtruriaandHa" "FentonEast" "FentonWestan" "FordGreenand" "Goldenhillan" "GreatChellan" "HanfordandTr" "HanleyParkan" "Hartshilland" "Hollybushand" "Joiner'sSqua" "LightwoodNor" "LittleChella" "MeirHay" "MeirNorth" "MeirPark" "MeirSouth" "Moorcroft" "PenkhullandS" "SandfordHill" "SneydGreen" "Springfields" "Tunstall" "WestonCoyney" "Alexandra" "Bixley" "Bridge" "CastleHill" "Gainsborough" "Gipping" "Holywells" "PrioryHeath" "Rushmere" "Sprites" "StJohn's" "StMargaret's" "StokePark" "Westgate" "Whitehouse" "Whitton" "Ashley" "Avonmouth" "Bedminster" "Bishopston" "Bishopsworth" "BrislingtonE" "BrislingtonW" "Cabot" "Clifton" "CliftonEast" "Cotham" "Easton" "Eastville" "Filwood" "FromeVale" "Hartcliffe" "Henbury" "Hengrove" "Henleaze" "Hillfields" "Horfield" "Kingsweston" "Knowle" "LawrenceHill" "Lockleaze" "Redland" "StGeorgeEast" "StGeorgeWest" "Southmead" "Southville" "Stockwood" "StokeBishop" "Westbury-on-" "WhitchurchPa" "WindmillHill" end
Any help would be appreciated.
Kind regards,
Kim
Comment