Re: [R] turning labels into a vector

2005-05-16 Thread Simon Blomberg
Try WBS.labs - as.vector(WBS)
WBS.labs[1]
substr(WBS.labs[1],1,1)
etc..
Cheers,
Simon.

Hello
1/ 'priors' is a table looking like:
W123 T678 S789
  23  42   11
  12  35 9
etc
2/ WBS - labels(priors) gives me a result of class list and length 
1 looking like:

W123 T678 S789

I want to read W123 into X[1] as W, T687 into X[2] as T and S789 
into X[3] as S using substr(X[1],1,1) but I'm having trouble 
extracting each group of 4 digits from WBS

Any help would be gratefully accepted.
thanks
Meredith
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat.
Visiting Fellow
School of Botany  Zoology
The Australian National University
Canberra ACT 0200
Australia
T: +61 2 6125 8057  email: [EMAIL PROTECTED]
F: +61 2 6125 5573
CRICOS Provider # 00120C
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] turning labels into a vector

2005-05-16 Thread Simon Blomberg
Umm. Again...

Try WBS.labs - as.vector(WBS[[1]])
WBS.labs[1]
substr(WBS.labs[1],1,1)
etc..
Cheers,
Simon.

Hello
1/ 'priors' is a table looking like:
W123 T678 S789
  23  42   11
  12  35 9
etc
2/ WBS - labels(priors) gives me a result of class list and length 
1 looking like:

W123 T678 S789

I want to read W123 into X[1] as W, T687 into X[2] as T and S789 
into X[3] as S using substr(X[1],1,1) but I'm having trouble 
extracting each group of 4 digits from WBS

Any help would be gratefully accepted.
thanks
Meredith
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat.
Visiting Fellow
School of Botany  Zoology
The Australian National University
Canberra ACT 0200
Australia
T: +61 2 6125 8057  email: [EMAIL PROTECTED]
F: +61 2 6125 5573
CRICOS Provider # 00120C
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] turning labels into a vector

2005-05-15 Thread Briggs, Meredith M
Hello


1/ 'priors' is a table looking like:

W123 T678 S789
  23  42   11
  12  35 9
etc

2/ WBS - labels(priors) gives me a result of class list and length 1 looking 
like:

W123 T678 S789



I want to read W123 into X[1] as W, T687 into X[2] as T and S789 into X[3] as S 
using substr(X[1],1,1) but I'm having trouble extracting each group of 4 digits 
from WBS

Any help would be gratefully accepted.

thanks
Meredith

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html