<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi everyone,<BR> <BR>For instance, let's suppose I have the an initial data frame DF, and I want to<br>rename and reorder some of its columns, so that the desired result is<br>expressed by DF2:<BR> <BR> <BR>set.seed(100)<br>DF = data.frame(A=letters[1:5],B=rnorm(5),C=rexp(5),D=runif(5))<br>DF2 <- data.frame(a=DF[,1],d=DF[,4],B=DF[,2])<BR><br>If I do the equivalent operations under data table format, I'm onñy able to obtain<br>the same result with the following code:<BR> <BR> <BR>set.seed(100)<br>DT = data.table(A=letters[1:5],B=rnorm(5),C=rexp(5),D=runif(5))<br>DT2 <- data.table(a=DT[,1,with=FALSE],d=DT[,4,with=FALSE],B=DT[,2,with=FALSE])<BR> <BR> <BR>Please, is it possible to get the same result with a more simply code?<BR>Thanks!<BR> </div></body>
</html>