Left join dataframes from xlsx and query for Report


I am new to R and I am wondering is it possible to do the following (see code below). I keep getting an error. My goal is to read in the xlsx file and then left join the query based on the name of the agent.

Also an issue. For some reason in the xlsx file, the names are stored as numbers. How do I fix this?


agent_scores <- read.xlsx("~/janeka/Agent Scorecard/agent_kpi_report_All CS_All_2020-01-01_2020-01-31.xlsx")

agent_qa <- qry("select *
from qadash_production" )

scorecard <- left_join(agent_scores,agent_qa,by="Agent.Name")

Hi, welcome!

We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

Here is an image of the data

Does this help? These come from two different sources and I want to join the 2 rows of data (QA information) with the first one.

Not really, we can't copy from that and try to reproduce your problem, please read the guide I gave you before and try to make a proper reproducible example.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.