Às 20:19 de 26/10/2022, Gábor Malomsoki escreveu:
If i change the column name:
"Dichtheits.- Durchflussprüfung M8.1"
In the csv to something else, like "x" then it works, but this is not the
elegant solution.


Gábor Malomsoki <gmalomsoki1...@gmail.com> schrieb am Mi., 26. Okt. 2022,
19:37:

Hello,

sure
dput(tomitettseg[10:15, c(1-8)])

structure(list(serial_number = c("3620000017126683", "3620000017126683",
"3620000017126683", "3620000017362605", "3620000017362605",
"3620000017362605"
), station_number = c(362060010081, 362060010081, 362060010081,
362060010081, 362060010081, 362060010081), station_desc = c("Dichtheits.-
Durchflussprüfung M8.1",
"Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
M8.1",
"Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
M8.1",
"Dichtheits.- Durchflussprüfung M8.1"), part_number = c(40005935L,
40005935L, 40005935L, 40005935L, 40005935L, 40005935L), book_date =
c("2019-01-15 07:49:58.467000000",
"2019-01-15 07:49:58.467000000", "2019-01-15 07:49:58.467000000",
"2019-01-15 07:58:18.403000000", "2019-01-15 07:58:18.403000000",
"2019-01-15 07:58:18.403000000"), measure_name = c("BlowBy (BlowBy)
Leckrate",
"BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate", "BlowBy (BlowBy)
Leckrate",
"BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate"), book_state = c(0L,
0L, 0L, 0L, 0L, 0L)), row.names = 10:15, class = "data.frame")



Am Mi., 26. Okt. 2022 um 19:05 Uhr schrieb Rui Barradas <
ruipbarra...@sapo.pt>:

Às 17:51 de 26/10/2022, Gábor Malomsoki escreveu:
   Dear all,

Error in parse(text = x, keep.source = TRUE) :
    <text>:13:66: unexpected INCOMPLETE_STRING
12:
13: tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
"Dichtheits.- Durchflusspr

i get this error message when i try to compile the report.
i think this is because of the punktuation mark between the quotation
marks
"." .
i do not know how to solve this, because with this column name i got the
csv,  and i am changing the column name in the script, not to have it so
long and avoid characters like .   ü  :
   tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
"Dichtheits.- Durchflussprüfung M8.1"] <-"D_D_"
thanks

BR
Gabor

       [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Hello,

Can you post the output of dput(x)? Or of dput(x[10:15])?

Hope this helps,

Rui Barradas




Hello,

Are you looking for this?



df1 <-
  structure(list(
    serial_number = c("3620000017126683", "3620000017126683",
                      "3620000017126683", "3620000017362605",
                      "3620000017362605", "3620000017362605"),
    station_number = c(362060010081, 362060010081, 362060010081,
                       362060010081, 362060010081, 362060010081),
    station_desc = c("Dichtheits.- Durchflussprüfung M8.1",
                     "Dichtheits.- Durchflussprüfung M8.1",
                     "Dichtheits.- Durchflussprüfung M8.1",
                     "Dichtheits.- Durchflussprüfung M8.1",
                     "Dichtheits.- Durchflussprüfung M8.1",
                     "Dichtheits.- Durchflussprüfung M8.1"),
part_number = c(40005935L, 40005935L, 40005935L, 40005935L, 40005935L, 40005935L), book_date = c("2019-01-15 07:49:58.467000000", "2019-01-15 07:49:58.467000000", "2019-01-15 07:49:58.467000000", "2019-01-15 07:58:18.403000000", "2019-01-15 07:58:18.403000000", "2019-01-15 07:58:18.403000000"),
    measure_name = c("BlowBy (BlowBy) Leckrate", "BlowBy (BlowBy) Druck",
                     "GESnA (GESnA) Leckrate", "BlowBy (BlowBy) Leckrate",
                     "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate"),
    book_state = c(0L,0L, 0L, 0L, 0L, 0L)),
    row.names = 10:15, class = "data.frame")

parse(text = df1, keep.source = TRUE)
#> expression(c("3620000017126683", "3620000017126683", "3620000017126683", "3620000017362605", "3620000017362605", "3620000017362605"), #> c(362060010081, 362060010081, 362060010081, 362060010081, 362060010081, 362060010081), #> c("Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung M8.1"),
#>     c(40005935, 40005935, 40005935, 40005935, 40005935, 40005935),
#> c("2019-01-15 07:49:58.467000000", "2019-01-15 07:49:58.467000000", "2019-01-15 07:49:58.467000000", "2019-01-15 07:58:18.403000000", "2019-01-15 07:58:18.403000000", "2019-01-15 07:58:18.403000000"), #> c("BlowBy (BlowBy) Leckrate", "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate", "BlowBy (BlowBy) Leckrate", "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate"),
#>     c(0, 0, 0, 0, 0, 0))


No errors, outputs an object of class "expression", as expected.
But I had to edit manually to remove the newline characters that came with it.

Hope this helps,

Rui Barradas

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to