rename function in dplyr does not work
<p>As the title of this post suggests, I am trying to rename some of the columns in my dataframe, but the code does not seem to work for me. There is no error message. So, I am wondering whether I am doing something wrong or missed something. This is the MWE.</p>

<pre><code>install.packages("rsdmx")
install.packages("dplyr")
library(rsdmx)
library(dplyr)
#Download data 
Assets.PIT &lt;- readSDMX("http://widukind-api.cepremap.org/api/v1/sdmx/IMF/data/IFS/..Q.BFPA-BP6-USD")
Assets.PIT &lt;- as.data.frame(Assets.PIT) 

names(Assets.PIT)[10]&lt;-"A.PI.T"

# Keep the required columns 
A.port.inv.total&lt;-Assets.PIT[c("WIDUKIND_NAME","REF-AREA","TIME_PERIOD","A.PI.T")]
</code></pre>

<p>So in the above code I want to rename some of the column in <code>A.port.inv.total</code>, So, I am using: </p>

<pre><code># Rename columns
rename(A.port.inv.total, Country=WIDUKIND_NAME, year=TIME_PERIOD)
</code></pre>

<p>but the resulting output is again: </p>

<pre><code>names(A.port.inv.total)
[1] "WIDUKIND_NAME" "REF-AREA"      "TIME_PERIOD"   "A.PI.T" 
</code></pre>

<p><strong>Updated Clarification</strong>
I want to rename the column vector <code>WIDUKIND_NAME</code> and <code>TIME_PERIOD</code> to <code>Country</code> and <code>year</code></p>