How do I group the first four columns and the last four columns using Dplyr?

Anonymous

I am working on an assignment where we are only allowed to used Dplyr in R. We have to print the first 4 columns and the last 4 columns with customers that have 10 or less Open Accounts. So far I have the following

OpenAccount <- filter(loans,OpenAccounts < 10,)

however, I am not sure how to only include the first four columns and the last 4 columns.

akrun

We can use select

library(dplyr)
OpenAccount %>%
      select(head(names(.), 4), tail(names(.), 4))

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I enforce uniqueness against four columns

From Dev

awk: delete the first column and add four columns after the last one

From Dev

How to Group Data of a My SQL Table on the Basis of Four Columns

From Dev

React: In a map loop, how do I break the table row after four columns have been printed?

From Dev

How can I sort the data in a table over four columns?

From Dev

How can I sort the data in a table over four columns?

From Dev

Creating four columns using php loop in table

From Dev

How do I move the first four elements of an arraylist into another arraylist?

From Dev

Inserting four columns into one

From Dev

Four items in two columns

From Dev

How to arrange numbers in four columns in C?

From Dev

How do I sweep specific columns with dplyr?

From Dev

How can I delete duplicates group 3 columns using two criteria (first two columns)?

From Dev

How to merge last four columns of a text file while inserting a different delimiter?

From Dev

print first four columns but afterwards every forth column

From Dev

How to print first four characters of first and last filenames in a directory

From Dev

How to print first four characters of first and last filenames in a directory

From Dev

How do I group pivot columns?

From Dev

How do I remove the first and last rows and columns from a 2D numpy array?

From Dev

How to fetch only first four rows of a google spreadsheet that contains more than 80K rows and more than 7 columns in GAE (using Java)

From Dev

How do I bracket the four corners of a button?

From Dev

How do I nest quotes four deep?

From Dev

How to bring four columns of excel data as two rows in pandas

From Dev

How to create dynamic responsive four columns with border style?

From Dev

how can we do reverse iteration of last four items in the XmlNodeList

From Dev

how do i get last result in group by MySQL query (not the first)

From Dev

How can I create the pattern for the first four lags for the remaining groups?

From Dev

How can I remove from string the four first characters? iMacros

From Dev

how to validate the first four character in string using php?

Related Related

  1. 1

    How do I enforce uniqueness against four columns

  2. 2

    awk: delete the first column and add four columns after the last one

  3. 3

    How to Group Data of a My SQL Table on the Basis of Four Columns

  4. 4

    React: In a map loop, how do I break the table row after four columns have been printed?

  5. 5

    How can I sort the data in a table over four columns?

  6. 6

    How can I sort the data in a table over four columns?

  7. 7

    Creating four columns using php loop in table

  8. 8

    How do I move the first four elements of an arraylist into another arraylist?

  9. 9

    Inserting four columns into one

  10. 10

    Four items in two columns

  11. 11

    How to arrange numbers in four columns in C?

  12. 12

    How do I sweep specific columns with dplyr?

  13. 13

    How can I delete duplicates group 3 columns using two criteria (first two columns)?

  14. 14

    How to merge last four columns of a text file while inserting a different delimiter?

  15. 15

    print first four columns but afterwards every forth column

  16. 16

    How to print first four characters of first and last filenames in a directory

  17. 17

    How to print first four characters of first and last filenames in a directory

  18. 18

    How do I group pivot columns?

  19. 19

    How do I remove the first and last rows and columns from a 2D numpy array?

  20. 20

    How to fetch only first four rows of a google spreadsheet that contains more than 80K rows and more than 7 columns in GAE (using Java)

  21. 21

    How do I bracket the four corners of a button?

  22. 22

    How do I nest quotes four deep?

  23. 23

    How to bring four columns of excel data as two rows in pandas

  24. 24

    How to create dynamic responsive four columns with border style?

  25. 25

    how can we do reverse iteration of last four items in the XmlNodeList

  26. 26

    how do i get last result in group by MySQL query (not the first)

  27. 27

    How can I create the pattern for the first four lags for the remaining groups?

  28. 28

    How can I remove from string the four first characters? iMacros

  29. 29

    how to validate the first four character in string using php?

HotTag

Archive