I have sample data as below
Die Device Id Vg W L
1 Device1 1 0 10 1
1 Device1 1.2 0.1 10 1
1 Device1 1.3 0.2 10 1
1 Device2 1 0 10 2
1 Device2 1.2 0.1 10 2
1 Device2 1.3 0.2 10 2
1 Device3 1 0 10 3
1 Device3 1.2 0.1 10 3
1 Device3 1.3 0.2 10 3
output:
data_tidy <- structure(list(Die = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), Device = c("Device1",
"Device1", "Device1", "Device2", "Device2", "Device2", "Device3",
"Device3", "Device3"), Id = c(1, 1.2, 1.3, 1, 1.2, 1.3, 1, 1.2,
1.3), Vg = c(0, 0.1, 0.2, 0, 0.1, 0.2, 0, 0.1, 0.2), W = c(10L,
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L), L = c(1L, 1L, 1L, 2L,
2L, 2L, 3L, 3L, 3L)), .Names = c("Die", "Device", "Id", "Vg",
"W", "L"), class = "data.frame", row.names = c(NA, -9L))
I use the following code snippet to interpolate the value Vgin the specified Id.
data_tidy %>% group_by(Die,Device) %>%
mutate(Vt=approx(x=log10(Id), y=Vg, xout=log10(3e-8*W/L))$y)
I get an error
Error: Invalid index type 'double'
I am surprised because I was able to compile this code a few days ago without any errors. I also discussed the code on the forum here . I am not sure what the problem is. Any help would be appreciated.