Difference between revisions of "INTERA:Time use based on activity"

From Testiwiki
Jump to: navigation, search
m
m (Formula)
Line 27: Line 27:
 
atu[atu[,4]=="n/a ",4] <- NA
 
atu[atu[,4]=="n/a ",4] <- NA
 
#lirary(OpasnetBaseUtils)
 
#lirary(OpasnetBaseUtils)
#Op_baseWrite("opasnet_base", atu) #commented out to prevent unintentional uploading
+
#op_baseWrite("opasnet_base", atu) #commented out to prevent unintentional uploading
 
</rcode></nowiki>
 
</rcode></nowiki>
  

Revision as of 10:51, 4 March 2011


Scope

This variable describes the time use of European population based on the activities.

Definition

Data

Mean of time used in different activities based on information of HETUS database [1]

Dependencies

Unit

Min per day

Formula

<rcode>
atu <- read.table("M:/Intera_data/Activity_time_use.csv", sep = ";", header = TRUE) #csv constructed by importing table below to excel
colnames(atu) <- gsub("  ", " ", gsub(".", " ", colnames(atu), fixed = TRUE))
atu <- reshape(atu, idvar = c("Country", "Sex"), times = colnames(atu)[3:ncol(atu)], timevar = "Activity", varying = 
list(colnames(atu)[3:ncol(atu)]), direction = "long") #reshaped from 2d value representation to 1d
colnames(atu)[4] <- "Result"
atu[atu[,4]=="n/a ",4] <- NA
#lirary(OpasnetBaseUtils)
#op_baseWrite("opasnet_base", atu) #commented out to prevent unintentional uploading
</rcode>

Result

Show results


See also

Keywords

References

Related files

<mfanonymousfilelist></mfanonymousfilelist>

INTERA:Time use based on activity. Opasnet . [1]. Accessed 26 Jun 2024.