Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Help needed in doing a few operations in the following data set(R)

$
0
0

@B.Rabbit wrote:

Hello,

The above file consists of 4 features namely Hospital_ID, District_ID, Instrument_ID and Projected Revenue. The list of all possible Instrument_IDs are given below:

[1] "Instrument 1"  "Instrument 10" "Instrument 11" "Instrument 13" "Instrument 15"
 [6] "Instrument 18" "Instrument 19" "Instrument 2"  "Instrument 20" "Instrument 3"
[11] "Instrument 4"  "Instrument 5"  "Instrument 6"  "Instrument 7"  "Instrument 8"

Say for some given Hospital_ID and District_ID there are just two Instrument_IDs and corresponding Projected Revenue are listed in the file, I want to create rows for the each of the other 14 Instrument_IDs with Projected Revenue = 0. I want to do this for all combinations of Hospital_ID and District_ID in the file.
How do I go about doing it?

Regards

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles