Limited output
StefaanD opened this issue · 1 comments
Just discovered your excellent engsoccerdata, but i seem to have some trouble with maketable.R
When following your example;
library(engsoccerdata)
library(dplyr)
df <- engsoccerdata2 %>% filter(tier==1 & Season==2013)
maketable(df)
i get correct output
Source: local data frame [20 x 9]
team GP W D L gf ga gd Pts
(chr) (int) (int) (int) (int) (int) (int) (int) (dbl)
1 Manchester City 38 27 5 6 102 37 65 86
2 Liverpool 38 26 6 6 101 50 51 84
3 Chelsea 38 25 7 6 71 27 44 82
4 Arsenal 38 24 7 7 68 41 27 79
5 Everton 38 21 9 8 61 39 22 72
6 Tottenham Hotspur 38 21 6 11 55 51 4 69
7 Manchester United 38 19 7 12 64 43 21 64
8 Southampton 38 15 11 12 54 46 8 56
9 Stoke City 38 13 11 14 45 52 -7 50
10 Newcastle United 38 15 4 19 43 59 -16 49
11 Crystal Palace 38 13 6 19 33 48 -15 45
12 Swansea City 38 11 9 18 54 54 0 42
13 West Ham United 38 11 7 20 40 51 -11 40
14 Sunderland 38 10 8 20 41 60 -19 38
15 Aston Villa 38 10 8 20 39 61 -22 38
16 Hull City 38 10 7 21 38 53 -15 37
17 West Bromwich Albion 38 7 15 16 43 59 -16 36
18 Norwich City 38 8 9 21 28 62 -34 33
19 Fulham 38 9 5 24 40 85 -45 32
20 Cardiff City 38 7 9 22 32 74 -42 30
But doing it for the second tier and the same season, i only shows the first 10 rows;
df <- engsoccerdata2 %>% filter(tier==2 & Season==2013)
maketable(df)
Source: local data frame [24 x 9]
team GP W D L gf ga gd Pts
(chr) (int) (int) (int) (int) (int) (int) (int) (dbl)
1 Leicester City 46 31 9 6 83 43 40 102
2 Burnley 46 26 15 5 72 37 35 93
3 Derby County 46 25 10 11 84 52 32 85
4 Queens Park Rangers 46 23 11 12 60 44 16 80
5 Wigan Athletic 46 21 10 15 61 48 13 73
6 Brighton & Hove Albion 46 19 15 12 55 40 15 72
7 Reading 46 19 14 13 70 56 14 71
8 Blackburn Rovers 46 18 16 12 70 62 8 70
9 Ipswich Town 46 18 14 14 60 54 6 68
10 AFC Bournemouth 46 18 12 16 67 66 1 66
.. ... ... ... ... ... ... ... ... ...
So the question is, do you have an idea why it doesn't show the rest of the table ?
This is only a truncated output in the console. It's because the returned object is a tbl_df class which is slightly different from a bog-standard dataframe. Try this:
engsoccerdata2 %>% filter(tier==2 & Season==2013) %>% maketable %>% data.frame()
It should get you the full table in the console.