why is the term "level" in the o/p.What is the significance of level?

Discussion in 'Big Data and Analytics' started by _34494, Aug 9, 2018 at 6:44 AM.

  1. _34494

    _34494 Member

    Joined:
    Jul 12, 2018
    Messages:
    6
    Likes Received:
    0
    name<- c("Andy","John","Jacob","Annie"),
    age<- c(8,8.5,7.5,8)
    gender<- c("M","M","F","F")
    employee<- c("IBM","Infosys","TCS","WIPRO")
    data<- c("data1","data2","data3")


    df1 <- data.frame( name,age,gender)

    rownames(df1) <-employee
    df1

    colnames(df1) <-data
    df1


    df1[1,3]


    o/p:

    > rownames(df1) <-employee
    > df1
    data1 data2 data3
    IBM Andy 8.0 M
    Infosys John 8.5 M
    TCS Jacob 7.5 F
    WIPRO Annie 8.0 F
    >
    > colnames(df1) <-data
    > df1
    data1 data2 data3
    IBM Andy 8.0 M
    Infosys John 8.5 M
    TCS Jacob 7.5 F
    WIPRO Annie 8.0 F
    >
    >
    > df1[1,3]
    [1] M
    Levels: F M


    MY QUERIES: why I see this level.What is the significance of level?
     
    #1
  2. Kunal Guwalani

    Kunal Guwalani Active Member
    Simplilearn Support

    Joined:
    Jul 17, 2018
    Messages:
    17
    Likes Received:
    0
    Hi Learner,

    Level refers to the distinct value in the data. However, you can refer to this link for more clarity:-
    https://www.datamentor.io/r-programming/factor

    I am sure this will help you.

    Happy learning
    Kunal Guwalani
    Simplilearn
     
    #2

Share This Page