0

I can access some but not all of the elements of a certain vector.

An example piece of data is here: http://speedy.sh/gQWQd/exampleR.Rdata (if someone got a better idea of how to store data I will be happy to change it)

#Load the example data:

    load( file="PATHNAME/Desktop/exampleR.Rdata" ) 

#Look at the data:

    data.frame( table( exampleVAR ) )


#This element can't be accessed:

which( exampleVAR=="Kort videregående uddannelse (op til 3 år – kræver forudgåen"  ) 



#However these elements can be accessed:

    which( exampleVAR=="Erhvervsfaglig uddannelse/faglært (f.eks. EUD, håndværksudda"  ) 

    which( exampleVAR=="Mellemlang videregående uddannelse (3-4 år)"  ) 

So the problem is:

Why can I access: "Erhvervsfaglig uddannelse/faglært (f.eks. EUD, håndværksudda" and "Mellemlang videregående uddannelse (3-4 år)"

when I can't access:

"Kort videregående uddannelse (op til 3 år – kræver forudgåen" ?

Sessioninfo:

sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Danish_Denmark.1252  LC_CTYPE=Danish_Denmark.1252    LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C                    LC_TIME=Danish_Denmark.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base  
Rasmus Larsen
  • 5,721
  • 8
  • 47
  • 79
  • 1
    Please study [the FAQ](http://stackoverflow.com/a/5963610/1412059) to learn how to create a reproducible example. Right now we can only guess. Possibly there is a problem with encoding. – Roland Nov 12 '13 at 14:09
  • Thanks. Following your idea I tried to use dput to reproduce the variable. Using this reproduced variable I could not reproduce the error. So using dput is actually another solution: Recreate the variable with dput = problem gone. – Rasmus Larsen Nov 12 '13 at 14:24
  • Following your advice I uploaded some data which should make the problem reproducible. – Rasmus Larsen Nov 13 '13 at 08:30

0 Answers0