[R] Creating a directory for my data
Uwe Ligges
ligges at statistik.tu-dortmund.de
Wed Mar 11 10:45:18 CET 2009
Hmmm, in fact I do not understand what you are going to do. Can you tell
us what the result of your code should look like?
Uwe Ligges
miya wrote:
> Hi everyone,
> I am currently working with a very large data set. It is data collected a
> few times a day, so there are repeated titles in the data set. I want to
> assign an id number to each different title and enter this information in a
> directory that I can access whenever I am working with the data.
>
> An example of a data I am workin with follows:
>
> 1 title A
> 2 title C
> 3 title B
> 1 title A
> 2 title B
> 3 title C
> 1 title D
> 2 title A
> 3 title C
> 1 title B
> 2 title A
> 3 title C
>
> What I have tried thus far is for loops.
>
> r<-matrix(x[,1])
> t<-matrix(x[,2])
> for(i in 1:length(t)) {
> for(k in 1:length(r)) {
> z = matrix(c(i,t))
> A = "Article A"
> for(j in 1:length(z)){
> if(B=="Article A")
>
> else{enter article in z}
> }
> }
>
> This is of course giving me a lot of errors. I just have no idea where to go
> with this. Does anyone have any ideas on where I can go from here to create
> my directory?
> I appreciate all your help.
> Thank you in advance.
>
More information about the R-help
mailing list