Solved: Re: ot: converting minutes in hour-decimals
Am 17.06.20 um 19:26 schrieb Rich Shepard: On Wed, 17 Jun 2020, Wolfgang Engelmann wrote: yes, thats clear, but how to do that one >>> You can use python for this on the command line. The aim is, to produce a second column with the hours-minutes in decimals, something like $1/60. Wolfgang, Oh. I'd use awk; a one-line script. Off the top of my head: #!/usr/bin/gawk BEGIN { FS=OFS=":" } { print $1 $2, $1 $2/60 } Almost certainly needs fine tuning. :-) Regards, Rich Thanks again, Rich, I tried to understand awk, but for me it was too aw(k)ful. Same with libreoffice calc and R. Too old and taking too much of my time to learn it. Found a simple solution >see todays Re: ot again: gnuplot> how to get decimal hour exported Wolfgang -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: ot: converting minutes in hour-decimals
Divide by 60? el On 2020-06-17 19:02 , Wolfgang Engelmann wrote: > off topic: How could I convert minutes in hour-decimals in a column such as > > 00:01 > 00:04 > 00:07 > 00:11 > 00:12 > 00:13 > 00:13 > 00:18 > 00:19 > 00:21 > 00:23 > 00:32 > 00:32 > and more > > so that e.g. 00:30 becomes 00.50 h > either by a unix terminal command or by gnuplot or pyxplot? > > Wolfgang -- If you want to email me, replace nospam with el -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: ot: converting minutes in hour-decimals
Am 17.06.20 um 19:26 schrieb Rich Shepard: On Wed, 17 Jun 2020, Wolfgang Engelmann wrote: yes, thats clear, but how to do that one >>> You can use python for this on the command line. The aim is, to produce a second column with the hours-minutes in decimals, something like $1/60. Wolfgang, Oh. I'd use awk; a one-line script. Off the top of my head: #!/usr/bin/gawk BEGIN { FS=OFS=":" } { print $1 $2, $1 $2/60 } Almost certainly needs fine tuning. :-) Regards, Rich Thanks, Rich sounds good. Will try tomorrow (I am a lark) Wolfgang -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: ot: converting minutes in hour-decimals
On Wed, 17 Jun 2020, Wolfgang Engelmann wrote: yes, thats clear, but how to do that one >>> You can use python for this on the command line. The aim is, to produce a second column with the hours-minutes in decimals, something like $1/60. Wolfgang, Oh. I'd use awk; a one-line script. Off the top of my head: #!/usr/bin/gawk BEGIN { FS=OFS=":" } { print $1 $2, $1 $2/60 } Almost certainly needs fine tuning. :-) Regards, Rich -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: ot: converting minutes in hour-decimals
Am 17.06.20 um 19:09 schrieb Rich Shepard: On Wed, 17 Jun 2020, Wolfgang Engelmann wrote: off topic: How could I convert minutes in hour-decimals in a column such as 00:01 00:04 00:07 00:11 00:12 00:13 00:13 00:18 00:19 00:21 00:23 00:32 00:32 and more so that e.g. 00:30 becomes 00.50 h either by a unix terminal command or by gnuplot or pyxplot? Wolfgang, Divide the minutes by 60. For example, 30. / 60. = 0.5 and 32. / 60. = 0.53 Then add them to the hours. It's similar to changing degrees-minutes-seconds to decimal degrees. yes, thats clear, but how to do that one >>> You can use python for this on the command line. The aim is, to produce a second column with the hours-minutes in decimals, something like $1/60. Wolfgang HTH, Rich -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: ot: converting minutes in hour-decimals
On Wed, 17 Jun 2020, Wolfgang Engelmann wrote: off topic: How could I convert minutes in hour-decimals in a column such as 00:01 00:04 00:07 00:11 00:12 00:13 00:13 00:18 00:19 00:21 00:23 00:32 00:32 and more so that e.g. 00:30 becomes 00.50 h either by a unix terminal command or by gnuplot or pyxplot? Wolfgang, Divide the minutes by 60. For example, 30. / 60. = 0.5 and 32. / 60. = 0.53 Then add them to the hours. It's similar to changing degrees-minutes-seconds to decimal degrees. You can use python for this on the command line. HTH, Rich -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
ot: converting minutes in hour-decimals
off topic: How could I convert minutes in hour-decimals in a column such as 00:01 00:04 00:07 00:11 00:12 00:13 00:13 00:18 00:19 00:21 00:23 00:32 00:32 and more so that e.g. 00:30 becomes 00.50 h either by a unix terminal command or by gnuplot or pyxplot? Wolfgang -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users