Question: The replace () help info is very basic and contains no examples. 
Say I have the following

```
ages <- sample(40:80, 10, replace = T)
weights <- 100 + ages*.2 + rnorm(10, 0 , 20)
type <- sample(letters[1:3], 10, replace = T)
grouping <- data.frame(ages,weights,type)

```

It may look like

```
   ages   weights type
1    49  81.27546    c
2    71 116.50149    c
3    67 152.14525    b
4    45 135.75849    c
5    72 114.35790    a
6    46 110.36591    a
7    40 106.16965    c
8    77 126.09591    c
9    44 107.28003    a
10   69  96.06653    b

```

I want to change the 'type' value in row 9 from 'a' to 'z'. I have looked to use the following commands, but neither has worked

```
replace(grouping$type[9],values = "z")

```

OR

```
grouping$type[9] <- z

```

Answer: 
A `String` contains an array of `char`s, not `byte`s. Therefore, the `String` cannot share the `byte`'s storage.

Additionally, note that the `byte[]` will be decoded into characters according to the platform default charset (per the documentation on `String(byte[])`), which implies further that a decoded version of the `byte[]` array has to be separately constructed.
Java `String`s are immutable, so the entire array has to be copied. Otherwise, you could change the contents of the `String` by modifying the `byte` array.