> Moritz Grenkehttp://www.360mix.de
>
> -Ursprüngliche Nachricht-
> Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im
> Auftrag von analys...@hotmail.com
> Gesendet: Freitag, 21. Januar 2011 03:02
> An: r-h...@r-project.org
> Betreff: [R] data
forgot the control parameters:
> sqldf("
+ select m.*, c.control_params
+ from master m, control c
+ where m.clientId = c.clientID
+ and m.date between c.mindate and c.maxdate
+ ")
clientId date value control_params
12 1002 10002 1
2
try 'sqldf'
> master=as.data.frame(list(clientId=c(1:4,2), date=1001:1005,
+ value=10001:10005))
> control=as.data.frame(list(clientId=c(2,3), mindate=c(100,1005),
+ maxdate=c(1005,1005), control.params=c(1,2)))
> master
clientId date value
11 1001 10001
22 1002 10002
33
3:02
An: r-help@r-project.org
Betreff: [R] data and parameters
(1) I have a master data frame that reads
ClientID |date |value
(2) I also have a control data frame that reads
Client ID| Min date| Max date| control parameters
The control data set may not have all client IDs .
I want to use the cont
(1) I have a master data frame that reads
ClientID |date |value
(2) I also have a control data frame that reads
Client ID| Min date| Max date| control parameters
The control data set may not have all client IDs .
I want to use the control data frame on the master data frame to
remove client ID
5 matches
Mail list logo