I need my footer to remain at the bottom of the page in landscape form. Most entries say that \usepackage{pdflscape} should do that, but it doesn't seem to be working,
\documentclass[12pt]{article}
\addtolength{\parskip}{\baselineskip}
\usepackage[margin=1in,includefoot]{geometry}
\usepackage[fleqn]{amsmath}
\usepackage{mathtools}
\usepackage{siunitx}
\setlength{\parindent}{0.25in}
%Tables preamble
\usepackage[none]{hyphenat}
\usepackage{float}
\usepackage[thinlines]{easytable}
\usepackage{longtable}
\usepackage{array, booktabs, makecell, multirow}
\renewcommand\theadfont{\bfseries\small}
\newcommand\mceight[1]{\multicolumn{8}{l}{#1}}
\newcommand\mctwelve[1]{\multicolumn{12}{c}{#1}}
\usepackage{arydshln}
\setlength\dashlinedash{0.2pt}
\setlength\dashlinegap{1.5pt}
\setlength\arrayrulewidth{0.3pt}
\usepackage{pdflscape}
\usepackage{afterpage}
\widowpenalty500
\clubpenalty=9996
\exhyphenpenalty=50 %for line-breaking at an explicit hyphen
\brokenpenalty=4991
\predisplaypenalty=10000
\postdisplaypenalty=1549
\displaywidowpenalty=1602
\floatingpenalty = 20000
\usepackage[labelfont=bf, textfont=bf]{caption}
% Header and footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyfoot[R]{ \thepage\ }
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{1pt}
\usepackage{booktabs}
\usepackage{dcolumn}
\begin{document}
\afterpage{\clearpage}
\begin{landscape}
\begin{longtable}[ht]{ l*{12}{S[table-format=2.3]}}
\caption{Quantile regresion results (pooled sample) for 2010-11}
\label{tab:quantile} \\
\toprule
\thead[b]{Dependant Variable:\\ log(hourly wages)}
& \mctwelve{\thead{Percentiles}} \\
\cmidrule(lr){1-1}\cmidrule(lr){2-13}
\multirow{2}{*}{\thead{Independent\\ Variables}}
& \multicolumn{2}{c}{10th}
& \multicolumn{2}{c}{30th}
& \multicolumn{2}{c}{50th}
& \multicolumn{2}{c}{70th}
& \multicolumn{2}{c}{90th}
& \multicolumn{2}{c}{OLS} \\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}
\cmidrule(lr){8-9}\cmidrule(lr){10-11}\cmidrule(lr){12-13}
& {coeff} & {t-stat} & {coeff} & {t-stat} & {coeff} & {t-stat}
& {coeff} & {t-stat} & {coeff} & {t-stat} & {coeff} & {t-stat} \\
\hdashline \\
\endfirsthead
%%%%
\caption[]{Quantile regression results (contd.)}
\endhead
\toprule
\thead[b]{Dependant Variable:\\ log(hourly wages)}
& \mctwelve{\thead{Percentiles}} \\
\cmidrule(lr){1-1}\cmidrule(lr){2-13}
\multirow{2}{*}{\thead{Independent\\ Variables}}
& \multicolumn{2}{c}{10th}
& \multicolumn{2}{c}{30th}
& \multicolumn{2}{c}{50th}
& \multicolumn{2}{c}{70th}
& \multicolumn{2}{c}{90th}
& \multicolumn{2}{c}{OLS} \\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}
\cmidrule(lr){8-9}\cmidrule(lr){10-11}\cmidrule(lr){12-13}
& {coeff} & {t-stat} & {coeff} & {t-stat} & {coeff} & {t-stat}
& {coeff} & {t-stat} & {coeff} & {t-stat} & {coeff} & {t-stat} \\
\midrule \\
\endhead
\midrule
\multicolumn{12}{r}{\footnotesize\textit{Continued on the next page}}
\endfoot
\endlastfoot
%%%%
\textbf{Constant}
& 1.107 & 9.96 & 1.606 & 20.07 & 1.859 & 26.76 & 2.095 & 29.12 & 2.642 & 28.94 & 1.740 & 27.51 \\ \hdashline
\textbf{Gender}
& 0.542 & 23.7 & 0.503 & 30.1 & 0.480 & 33.24 & 0.418 & 27.28 & 0.309 & 15.99 & 0.443 & 33.33 \\ \hdashline
\bottomrule
\label{tab:quantilereg}
\end{longtable}
\end{landscape}
\end{document}
\afterpage{\clearpage}? it is doing nothing at all if used before\begin{landscape}but\afterpageis a very fragile thing only intended to be used in very special circumstances. – David Carlisle Sep 09 '17 at 15:47