I have a list() with 570 dataframes and i want to change the name of all these data.frames to a value that is refered inside of these dataframes.
im trying:
map(dicom_patient1_hdr, ~filter(.x, grepl("SeriesNumber|InstanceNumber", name))) -> numbers
numbers$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356202.44143.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 1
2 0020 0013 InstanceNumber IS 2 1
head(numbers, 20)
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356202.44143.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 1
2 0020 0013 InstanceNumber IS 2 1
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356285.44256.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 1
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356285.44257.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 2
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356285.44258.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 3
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356285.44259.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 4
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356285.44260.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 5
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356285.44261.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 6
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356286.44262.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 7
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356286.44263.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 8
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356286.44264.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 9
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356286.44265.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 10
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356286.44266.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 11
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356286.44267.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 12
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356286.44268.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 13
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356287.44269.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 14
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356287.44270.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 15
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356287.44271.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 16
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356287.44272.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 17
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356287.44273.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 18
$data-files/patient1_jpeg_transformed_img//1.2.840.113704.1.111.28952.1503356287.44274.dcm
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 19
names(numbers) <- map(numbers, ~extract(.x, "value"))
head(numbers, 20)
$list(value = c("1", "1"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 1
2 0020 0013 InstanceNumber IS 2 1
$list(value = c("2", "1"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 1
$list(value = c("2", "2"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 2
$list(value = c("2", "3"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 3
$list(value = c("2", "4"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 4
$list(value = c("2", "5"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 5
$list(value = c("2", "6"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 6
$list(value = c("2", "7"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 7
$list(value = c("2", "8"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 8
$list(value = c("2", "9"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 9
$list(value = c("2", "10"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 10
$list(value = c("2", "11"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 11
$list(value = c("2", "12"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 12
$list(value = c("2", "13"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 13
$list(value = c("2", "14"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 14
$list(value = c("2", "15"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 15
$list(value = c("2", "16"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 16
$list(value = c("2", "17"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 17
$list(value = c("2", "18"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 18
$list(value = c("2", "19"))
group element name code length value sequence
1 0020 0011 SeriesNumber IS 2 2
2 0020 0013 InstanceNumber IS 2 19
####################################################
I want to change the name of the dataframe to "data.frame$SeriesNumber"_"InstanceNumber"
the result should be (example) 2_18
Is there a short string to solve that? tanks