[R] Extract data of special character

roslinazairimah zakaria ro@||n@ump @end|ng |rom gm@||@com
Thu Mar 14 20:06:28 CET 2019


Hi r-users,

I have these data and I would like to count (frequency) how many of
ATTRIBUTE related to TRAITS.

> dput(dd)
structure(list(ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c("AA11063",
"AA11127", "AA15194", "CB13086", "EA15058"), class = "factor"),
    NAME = structure(c(5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 4L, 4L, 4L, 4L, 4L,
    4L, 4L, 4L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
    2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("FIONA ANAK
GASING",
    "JAMES WONG NGUONG DEK", "KOH BEE FONG", "NUR EZREEN BINTI JASNI",
    "SIOW SIN YANG"), class = "factor"), FACULTY = structure(c(1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L,
    3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L,
    2L, 2L, 2L, 2L), .Label = c("FKASA", "FKEE", "FSKKP"), class =
"factor"),
    ATTRIBUTE = structure(c(7L, 9L, 1L, 5L, 6L, 4L, 3L, 2L, 8L,
    10L, 7L, 9L, 1L, 5L, 6L, 4L, 3L, 2L, 8L, 10L, 7L, 9L, 1L,
    5L, 6L, 4L, 3L, 2L, 8L, 10L, 7L, 9L, 1L, 5L, 6L, 4L, 3L,
    2L, 8L, 10L, 7L, 9L, 1L, 5L, 6L, 4L, 3L, 2L, 8L, 10L), .Label =
c("COMMUNICATION",
    "CREATIVITY", "ENTREPRENEURIAL SKILLS", "INFORMATION MANAGEMENT AND
LIFELONG LEARNING",
    "LEADERSHIP AND TEAMWORK SKILLS", "PROBLEM SOLVING", "SOCIAL SKILLS",
    "UNITY AND PATRIOTISM", "VALUES, ATTITUDES AND PROFESSIONALISM",
    "VOLUNTEERISM"), class = "factor"), POINT = structure(c(3L,
    20L, 21L, 3L, 12L, 25L, 19L, 12L, 11L, 21L, 11L, 11L, 26L,
    7L, 5L, 16L, 12L, 4L, 16L, 27L, 4L, 16L, 12L, 8L, 4L, 4L,
    19L, 19L, 25L, 15L, 6L, 1L, 14L, 9L, 14L, 4L, 15L, 22L, 23L,
    19L, 4L, 2L, 17L, 10L, 18L, 16L, 12L, 24L, 13L, 4L), .Label =
c("1,030",
    "1,160", "10", "120", "140", "2,100", "2,140", "2,380", "2,390",
    "2,440", "20", "240", "320", "340", "360", "40", "400", "440",
    "480", "520", "60", "600", "700", "720", "80", "810", "840"
    ), class = "factor"), SCORE = c(2L, 35L, 6L, 1L, 48L, 16L,
    96L, 24L, 2L, 6L, 4L, 1L, 81L, 100L, 28L, 8L, 48L, 12L, 4L,
    84L, 24L, 3L, 24L, 100L, 24L, 24L, 96L, 48L, 8L, 36L, 100L,
    69L, 34L, 100L, 68L, 24L, 72L, 60L, 70L, 48L, 24L, 77L, 40L,
    100L, 88L, 8L, 48L, 72L, 32L, 12L), TRAIT = structure(c(5L,
    5L, 5L, 3L, 4L, 5L, 2L, 5L, 5L, 5L, 5L, 5L, 2L, 2L, 5L, 5L,
    4L, 5L, 5L, 2L, 5L, 5L, 5L, 2L, 5L, 5L, 2L, 4L, 5L, 5L, 2L,
    6L, 5L, 2L, 6L, 5L, 1L, 6L, 1L, 4L, 5L, 1L, 4L, 2L, 2L, 5L,
    4L, 1L, 5L, 5L), .Label = c("ACHIEVER", "CONQUEROR", "INTROVERT",
    "NOVICE", "SEEKER", "SURVIVOR"), class = "factor")), class =
"data.frame", row.names = c(NA,-50L))

Thank you so much for any help given.
-- 
*Roslinazairimah Zakaria*
*Tel: +609-5492370; Fax. No.+609-5492766*

*Email: roslinazairimah using ump.edu.my <roslinazairimah using ump.edu.my>;
roslinaump using gmail.com <roslinaump using gmail.com>*
Faculty of Industrial Sciences & Technology
University Malaysia Pahang
Lebuhraya Tun Razak, 26300 Gambang, Pahang, Malaysia

	[[alternative HTML version deleted]]



More information about the R-help mailing list