Closed

Question in R Language

I'm trying to use R to create a new dynamic pivot table.

dt <- [login to view URL](TableIn)

PivotTable1 <- dcast(dt, A + B + C + D ~E, [login to view URL] = "F")

PivotTable <- PivotTable1[c("B","P",“C”,"A","G")]

From this function, I'm able to create a new dynamic pivot table.

Right now, I would like to set a order on this new table likes third function above.

But issue is that I'm not able to set order for columns newly generated from dcast function such as G & P.

For example, we can generate columns "B",“C”,"G","A" under case 1 while generating columns "B",“C”,"P","A", under case 2. Then it shows me error message. Because case 1 doesn't include column "P". However, we set a order for column "P" in third function.

Right now, I need a function which is able to generate all columns by particular order. If some columns are not available in some inputs, other columns are still supposed to be in order.

Skills: R Programming Language

See more: r programming questions and answers pdf, r interview questions for data scientist, r coding questions, r interview questions listen data, r statistics interview questions, r questions and answers, multiple choice questions in r programming, r programming exam questions, I\ m starting a construction company and I would like to create a logo for The Company name is C&A , and it has a saying : empre, I\ m trying to do data entry, r language, r language freelancer com, r language freelance, looking for a 2d animator to create an approximately 60 second end credit sequence for a short film i m looking for a similar st, i m looking for a sport shoe designer to create a new product for me company in thailand that could make different sports clothi

About the Employer:
( 4 reviews ) Jersey City, United States

Project ID: #15339772

5 freelancers are bidding on average $47 for this job

suyashdhoot

Hi I am a very experienced statistician and academic writer. I have completed several PhD level thesis projects involving advanced statistical analysis of data. I have worked with data from several companies and have d More

$100 USD in 1 day
(11 Reviews)
4.1
lalithsai09

Experienced R programmer with more than 4 years of experience as a Developer and Analyst. Relevant Skills and Experience Proficient with packages like [login to view URL], dplyr, tidyr etc. for data preparation and pre-process More

$30 USD in 1 day
(7 Reviews)
3.4
nidhi1509

A proposal has not yet been provided

$50 USD in 2 days
(3 Reviews)
2.4
mariamosama2013

About me: Graduated from statistic department in faculty of economic & politic science, Cairo University. Sub-specialized in social science computing Cum. Grade: Good Graduation project grade: Excellent. How can I More

$30 USD in 2 days
(2 Reviews)
1.8
$25 USD in 1 day
(1 Review)
1.2