Re: [R] Mutate issue help needed

2024-12-17 Thread Rui Barradas

Às 21:52 de 17/12/2024, Neotropical bat risk assessments escreveu:

Hi all,
Tnx for the varied suggestions.  I tried the "cleaned up code" John 
suggested with the same Mutate error message
No clue why an asterisk * was added to the message lines that were only 
# comments.
Eons ago Hadley helped with the code with early versions of the original 
GGPLOT and it has been modified a bit to reflect current packages and 
worked when pasted into the R 4.4.0 console.


What has distressed me is the saved code lines worked some 8-10 months 
back.
Below is a sample of the data. The one named Buzz.txt.  Both dates and 
time were defined as text characters, so not Excel coded date/times.


If anyone is able/willing to trouble shoot the code happy to go off list 
and use direct email.


Species    Location    Date    Time
Molspp    Malvita    12/8/2024    17:30
Molspp    Malvita    12/8/2024    17:30
Perkap    Malvita    12/8/2024    18:29
Perkap    Malvita    12/8/2024    18:47
Perkap    Malvita    12/8/2024    18:47
Perkap    Malvita    12/8/2024    18:47
Perkap    Malvita    12/8/2024    18:49
Perkap    Malvita    12/8/2024    18:49
Ptemac    Malvita    12/8/2024    19:07
Ptemac    Malvita    12/8/2024    19:09
Ptemac    Malvita    12/8/2024    19:09
Permac    Malvita    12/8/2024    19:11
Perkap    Malvita    12/8/2024    19:13
Perkap    Malvita    12/8/2024    19:21
Permac    Malvita    12/8/2024    19:24
Permac    Malvita    12/8/2024    19:44
Permac    Malvita    12/8/2024    19:58
Ptemac    Malvita    12/8/2024    19:58
Permac    Malvita    12/8/2024    20:10
Ptemac    Malvita    12/8/2024    20:13
Perkap    Malvita    12/8/2024    20:14
Perkap    Malvita    12/8/2024    20:14
Perkap    Malvita    12/8/2024    20:17
Perkap    Malvita    12/8/2024    20:19
Perkap    Malvita    12/8/2024    20:19
Perkap    Malvita    12/8/2024    20:20
Perkap    Malvita    12/8/2024    20:20
Perkap    Malvita    12/8/2024    20:21
Perkap    Malvita    12/8/2024    20:22
Perkap    Malvita    12/8/2024    20:23
Perkap    Malvita    12/8/2024    20:25
Perkap    Malvita    12/8/2024    20:26
Perkap    Malvita    12/8/2024    20:26
Perkap    Malvita    12/8/2024    20:27
Perkap    Malvita    12/8/2024    20:28
Perkap    Malvita    12/8/2024    20:28
Perkap    Malvita    12/8/2024    20:29
Perkap    Malvita    12/8/2024    20:29
Permac    Malvita    12/8/2024    20:30
Perkap    Malvita    12/8/2024    20:31
Perkap    Malvita    12/8/2024    20:32
Perkap    Malvita    12/8/2024    20:32
Perkap    Malvita    12/8/2024    20:33
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:38
Perkap    Malvita    12/8/2024    20:38
Perkap    Malvita    12/8/2024    20:38
Perkap    Malvita    12/8/2024    20:39
Perkap    Malvita    12/8/2024    20:40
Perkap    Malvita    12/8/2024    20:41
Perkap    Malvita    12/8/2024    20:42
Perkap    Malvita    12/8/2024    20:42
Perkap    Malvita    12/8/2024    20:42
Perkap    Malvita    12/8/2024    20:43
Perkap    Malvita    12/8/2024    21:03
Perkap    Malvita    12/8/2024    21:14
Perkap    Malvita    12/8/2024    21:14
Perkap    Malvita    12/8/2024    21:15
Perkap    Malvita    12/8/2024    21:15
Perkap    Malvita    12/8/2024    21:15
Perkap    Malvita    12/8/2024    21:16
Perkap    Malvita    12/8/2024    21:16
Perkap    Malvita    12/8/2024    21:18
Perkap    Malvita    12/8/2024    21:20
Perkap    Malvita    12/8/2024    21:20
Perkap    Malvita    12/8/2024    21:21
Perkap    Malvita    12/8/2024    21:22
Perkap    Malvita    12/8/2024    21:22
Perkap    Malvita    12/8/2024    21:23
Perkap    Malvita    12/8/2024    21:24
Perkap    Malvita    12/8/2024    21:25
Permac    Malvita    12/8/2024    21:25
Ptemac    Malvita    12/8/2024    21:25
Permac    Malvita    12/8/2024    21:27
Permac    Malvita    12/8/2024    21:27
Perkap    Malvita    12/8/2024    21:28
Perkap    Malvita    12/8/2024    21:28
Perkap    Malvita    12/8/2024    21:29
Perkap    Malvita    12/8/2024    21:30
Perkap    Malvita    12/8/2024    21:30
Perkap    Malvita    12/8/2024    21:30
Perkap    Malvita    12/8/2024    21:31
Perkap    Malvita    12/8/2024    21:32
Perkap    Malvita    12/8/2024    21:33
Perkap    Malvita    12/8/2024    21:34
Perkap    Malvita    12/8/2024    21:35
Perkap    Malvita    12/8/2024    21:36
Perkap    Malvita    12/8/2024    21:36
Perkap    Malvita    12/8/2024    21:37
Permac    Malvita    12/8/2024    21:37
Perkap    Malvita    12/8/2024    21:39
Perkap    Malvita    12/8/2024    21:39
Perkap    Malvita    12/8/2024    21:39
Perkap    Malvita    12/8/2024    21:41
Perkap    Malvita    12/8/2024    21:41
Perkap    Malvita    12/8/2024    21:42
Perkap    Malvita    12/8/2024    21:43
Perkap    Malvita    12/8/2024    21:43
Perkap    Malvita    12/8/2024    21:44
Perkap    Malvita    12/8/2024    21:46
Perkap    Malvita    12/8/2024    21:47
Perkap    Malvit

Re: [R] Mutate issue help needed

2024-12-17 Thread CALUM POLWART
Indeed.

When I try and recreate your problem I fail to find a problem.

But almost certainly the issue lies in the file, or the reading of said
file.

Currently the code is

fname <- "Buzz.txt"

All <- fname

That results in All containing "Buzz.txt" not the CONTENT of a file called
Buzz.txt.

As much as you think that worked a few months back, it 100% can't have.

If I save your sample data to a file called Buzz.txt and make the line

All <- read_table(fname)

It works...

dput would have led you there as it doesn't output your data, so you didn't
read in your data

On Tue, 17 Dec 2024, 23:08 Bert Gunter,  wrote:

> Bruce,
>
> You failed to post (some of) your data using dput() as was requested
> by John Kane. The reason that this is important is that it would tell
> us exactly what your data consist of -- i.e date-times, character,
> factors, etc. -- which your use of cut and paste does not.
>
> So if for some reason you do not want to use dput(), could you at
> least show the ouput of:
> str(All)
> This should provide the same information.
> And, as you have been asked, please post in plain text to avoid the
> confusion caused by HTML conversion. I believe that this will help
> those trying to help you resolve your problem.
>
> Cheers,
> Bert
>
>
> On Tue, Dec 17, 2024 at 2:02 PM Neotropical bat risk assessments
>  wrote:
> >
> > Hi all,
> > Tnx for the varied suggestions.  I tried the "cleaned up code" John
> > suggested with the same Mutate error message
> > No clue why an asterisk * was added to the message lines that were only
> > # comments.
> > Eons ago Hadley helped with the code with early versions of the original
> > GGPLOT and it has been modified a bit to reflect current packages and
> > worked when pasted into the R 4.4.0 console.
> >
> > What has distressed me is the saved code lines worked some 8-10 months
> back.
> > Below is a sample of the data. The one named Buzz.txt.  Both dates and
> > time were defined as text characters, so not Excel coded date/times.
> >
> > If anyone is able/willing to trouble shoot the code happy to go off list
> > and use direct email.
> >
> > SpeciesLocationDateTime
> > MolsppMalvita12/8/202417:30
> > MolsppMalvita12/8/202417:30
> > PerkapMalvita12/8/202418:29
> > PerkapMalvita12/8/202418:47
> > PerkapMalvita12/8/202418:47
> > PerkapMalvita12/8/202418:47
> > PerkapMalvita12/8/202418:49
> > PerkapMalvita12/8/202418:49
> > PtemacMalvita12/8/202419:07
> > PtemacMalvita12/8/202419:09
> > PtemacMalvita12/8/202419:09
> > PermacMalvita12/8/202419:11
> > PerkapMalvita12/8/202419:13
> > PerkapMalvita12/8/202419:21
> > PermacMalvita12/8/202419:24
> > PermacMalvita12/8/202419:44
> > PermacMalvita12/8/202419:58
> > PtemacMalvita12/8/202419:58
> > PermacMalvita12/8/202420:10
> > PtemacMalvita12/8/202420:13
> > PerkapMalvita12/8/202420:14
> > PerkapMalvita12/8/202420:14
> > PerkapMalvita12/8/202420:17
> > PerkapMalvita12/8/202420:19
> > PerkapMalvita12/8/202420:19
> > PerkapMalvita12/8/202420:20
> > PerkapMalvita12/8/202420:20
> > PerkapMalvita12/8/202420:21
> > PerkapMalvita12/8/202420:22
> > PerkapMalvita12/8/202420:23
> > PerkapMalvita12/8/202420:25
> > PerkapMalvita12/8/202420:26
> > PerkapMalvita12/8/202420:26
> > PerkapMalvita12/8/202420:27
> > PerkapMalvita12/8/202420:28
> > PerkapMalvita12/8/202420:28
> > PerkapMalvita12/8/202420:29
> > PerkapMalvita12/8/202420:29
> > PermacMalvita12/8/202420:30
> > PerkapMalvita12/8/202420:31
> > PerkapMalvita12/8/202420:32
> > PerkapMalvita12/8/202420:32
> > PerkapMalvita12/8/202420:33
> > PerkapMalvita12/8/202420:36
> > PerkapMalvita12/8/202420:36
> > PerkapMalvita12/8/202420:36
> > PerkapMalvita12/8/202420:36
> > PerkapMalvita12/8/202420:38
> > PerkapMalvita12/8/202420:38
> > PerkapMalvita12/8/202420:38
> > PerkapMalvita12/8/202420:39
> > PerkapMalvita12/8/202420:40
> > PerkapMalvita12/8/202420:41
> > PerkapMalvita12/8/202420:42
> > PerkapMalvita12/8/202420:42
> > PerkapMalvita12/8/202420:42
> > PerkapMalvita12/8/202420:43
> > PerkapMalvita12/8/202421:03
> > PerkapMalvita12/8/202421:14
> > PerkapMalvita12/8/202421:14
> > PerkapMalvita12/8/202421:15
> > PerkapMalvita12/8/202421:15
> > PerkapMalvita12/8/202421:15
> > PerkapMalvita12/8/202421:16
> > PerkapMalvit

Re: [R] Mutate issue help needed

2024-12-17 Thread Bert Gunter
Bruce,

You failed to post (some of) your data using dput() as was requested
by John Kane. The reason that this is important is that it would tell
us exactly what your data consist of -- i.e date-times, character,
factors, etc. -- which your use of cut and paste does not.

So if for some reason you do not want to use dput(), could you at
least show the ouput of:
str(All)
This should provide the same information.
And, as you have been asked, please post in plain text to avoid the
confusion caused by HTML conversion. I believe that this will help
those trying to help you resolve your problem.

Cheers,
Bert


On Tue, Dec 17, 2024 at 2:02 PM Neotropical bat risk assessments
 wrote:
>
> Hi all,
> Tnx for the varied suggestions.  I tried the "cleaned up code" John
> suggested with the same Mutate error message
> No clue why an asterisk * was added to the message lines that were only
> # comments.
> Eons ago Hadley helped with the code with early versions of the original
> GGPLOT and it has been modified a bit to reflect current packages and
> worked when pasted into the R 4.4.0 console.
>
> What has distressed me is the saved code lines worked some 8-10 months back.
> Below is a sample of the data. The one named Buzz.txt.  Both dates and
> time were defined as text characters, so not Excel coded date/times.
>
> If anyone is able/willing to trouble shoot the code happy to go off list
> and use direct email.
>
> SpeciesLocationDateTime
> MolsppMalvita12/8/202417:30
> MolsppMalvita12/8/202417:30
> PerkapMalvita12/8/202418:29
> PerkapMalvita12/8/202418:47
> PerkapMalvita12/8/202418:47
> PerkapMalvita12/8/202418:47
> PerkapMalvita12/8/202418:49
> PerkapMalvita12/8/202418:49
> PtemacMalvita12/8/202419:07
> PtemacMalvita12/8/202419:09
> PtemacMalvita12/8/202419:09
> PermacMalvita12/8/202419:11
> PerkapMalvita12/8/202419:13
> PerkapMalvita12/8/202419:21
> PermacMalvita12/8/202419:24
> PermacMalvita12/8/202419:44
> PermacMalvita12/8/202419:58
> PtemacMalvita12/8/202419:58
> PermacMalvita12/8/202420:10
> PtemacMalvita12/8/202420:13
> PerkapMalvita12/8/202420:14
> PerkapMalvita12/8/202420:14
> PerkapMalvita12/8/202420:17
> PerkapMalvita12/8/202420:19
> PerkapMalvita12/8/202420:19
> PerkapMalvita12/8/202420:20
> PerkapMalvita12/8/202420:20
> PerkapMalvita12/8/202420:21
> PerkapMalvita12/8/202420:22
> PerkapMalvita12/8/202420:23
> PerkapMalvita12/8/202420:25
> PerkapMalvita12/8/202420:26
> PerkapMalvita12/8/202420:26
> PerkapMalvita12/8/202420:27
> PerkapMalvita12/8/202420:28
> PerkapMalvita12/8/202420:28
> PerkapMalvita12/8/202420:29
> PerkapMalvita12/8/202420:29
> PermacMalvita12/8/202420:30
> PerkapMalvita12/8/202420:31
> PerkapMalvita12/8/202420:32
> PerkapMalvita12/8/202420:32
> PerkapMalvita12/8/202420:33
> PerkapMalvita12/8/202420:36
> PerkapMalvita12/8/202420:36
> PerkapMalvita12/8/202420:36
> PerkapMalvita12/8/202420:36
> PerkapMalvita12/8/202420:38
> PerkapMalvita12/8/202420:38
> PerkapMalvita12/8/202420:38
> PerkapMalvita12/8/202420:39
> PerkapMalvita12/8/202420:40
> PerkapMalvita12/8/202420:41
> PerkapMalvita12/8/202420:42
> PerkapMalvita12/8/202420:42
> PerkapMalvita12/8/202420:42
> PerkapMalvita12/8/202420:43
> PerkapMalvita12/8/202421:03
> PerkapMalvita12/8/202421:14
> PerkapMalvita12/8/202421:14
> PerkapMalvita12/8/202421:15
> PerkapMalvita12/8/202421:15
> PerkapMalvita12/8/202421:15
> PerkapMalvita12/8/202421:16
> PerkapMalvita12/8/202421:16
> PerkapMalvita12/8/202421:18
> PerkapMalvita12/8/202421:20
> PerkapMalvita12/8/202421:20
> PerkapMalvita12/8/202421:21
> PerkapMalvita12/8/202421:22
> PerkapMalvita12/8/202421:22
> PerkapMalvita12/8/202421:23
> PerkapMalvita12/8/202421:24
> PerkapMalvita12/8/202421:25
> PermacMalvita12/8/202421:25
> PtemacMalvita12/8/202421:25
> PermacMalvita12/8/202421:27
> PermacMalvita12/8/202421:27
> PerkapMalvita12/8/202421:28
> PerkapMalvita12/8/202421:28
> PerkapMalvita12/8/202421:29
> PerkapMalvita12/8/202421:30
> PerkapMalvita12/8/202421:30
> PerkapMalvita12/8/202421:30
> Perka

Re: [R] Mutate issue help needed

2024-12-17 Thread Neotropical bat risk assessments

Hi all,
Tnx for the varied suggestions.  I tried the "cleaned up code" John 
suggested with the same Mutate error message
No clue why an asterisk * was added to the message lines that were only 
# comments.
Eons ago Hadley helped with the code with early versions of the original 
GGPLOT and it has been modified a bit to reflect current packages and 
worked when pasted into the R 4.4.0 console.


What has distressed me is the saved code lines worked some 8-10 months back.
Below is a sample of the data. The one named Buzz.txt.  Both dates and 
time were defined as text characters, so not Excel coded date/times.


If anyone is able/willing to trouble shoot the code happy to go off list 
and use direct email.


Species    Location    Date    Time
Molspp    Malvita    12/8/2024    17:30
Molspp    Malvita    12/8/2024    17:30
Perkap    Malvita    12/8/2024    18:29
Perkap    Malvita    12/8/2024    18:47
Perkap    Malvita    12/8/2024    18:47
Perkap    Malvita    12/8/2024    18:47
Perkap    Malvita    12/8/2024    18:49
Perkap    Malvita    12/8/2024    18:49
Ptemac    Malvita    12/8/2024    19:07
Ptemac    Malvita    12/8/2024    19:09
Ptemac    Malvita    12/8/2024    19:09
Permac    Malvita    12/8/2024    19:11
Perkap    Malvita    12/8/2024    19:13
Perkap    Malvita    12/8/2024    19:21
Permac    Malvita    12/8/2024    19:24
Permac    Malvita    12/8/2024    19:44
Permac    Malvita    12/8/2024    19:58
Ptemac    Malvita    12/8/2024    19:58
Permac    Malvita    12/8/2024    20:10
Ptemac    Malvita    12/8/2024    20:13
Perkap    Malvita    12/8/2024    20:14
Perkap    Malvita    12/8/2024    20:14
Perkap    Malvita    12/8/2024    20:17
Perkap    Malvita    12/8/2024    20:19
Perkap    Malvita    12/8/2024    20:19
Perkap    Malvita    12/8/2024    20:20
Perkap    Malvita    12/8/2024    20:20
Perkap    Malvita    12/8/2024    20:21
Perkap    Malvita    12/8/2024    20:22
Perkap    Malvita    12/8/2024    20:23
Perkap    Malvita    12/8/2024    20:25
Perkap    Malvita    12/8/2024    20:26
Perkap    Malvita    12/8/2024    20:26
Perkap    Malvita    12/8/2024    20:27
Perkap    Malvita    12/8/2024    20:28
Perkap    Malvita    12/8/2024    20:28
Perkap    Malvita    12/8/2024    20:29
Perkap    Malvita    12/8/2024    20:29
Permac    Malvita    12/8/2024    20:30
Perkap    Malvita    12/8/2024    20:31
Perkap    Malvita    12/8/2024    20:32
Perkap    Malvita    12/8/2024    20:32
Perkap    Malvita    12/8/2024    20:33
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:36
Perkap    Malvita    12/8/2024    20:38
Perkap    Malvita    12/8/2024    20:38
Perkap    Malvita    12/8/2024    20:38
Perkap    Malvita    12/8/2024    20:39
Perkap    Malvita    12/8/2024    20:40
Perkap    Malvita    12/8/2024    20:41
Perkap    Malvita    12/8/2024    20:42
Perkap    Malvita    12/8/2024    20:42
Perkap    Malvita    12/8/2024    20:42
Perkap    Malvita    12/8/2024    20:43
Perkap    Malvita    12/8/2024    21:03
Perkap    Malvita    12/8/2024    21:14
Perkap    Malvita    12/8/2024    21:14
Perkap    Malvita    12/8/2024    21:15
Perkap    Malvita    12/8/2024    21:15
Perkap    Malvita    12/8/2024    21:15
Perkap    Malvita    12/8/2024    21:16
Perkap    Malvita    12/8/2024    21:16
Perkap    Malvita    12/8/2024    21:18
Perkap    Malvita    12/8/2024    21:20
Perkap    Malvita    12/8/2024    21:20
Perkap    Malvita    12/8/2024    21:21
Perkap    Malvita    12/8/2024    21:22
Perkap    Malvita    12/8/2024    21:22
Perkap    Malvita    12/8/2024    21:23
Perkap    Malvita    12/8/2024    21:24
Perkap    Malvita    12/8/2024    21:25
Permac    Malvita    12/8/2024    21:25
Ptemac    Malvita    12/8/2024    21:25
Permac    Malvita    12/8/2024    21:27
Permac    Malvita    12/8/2024    21:27
Perkap    Malvita    12/8/2024    21:28
Perkap    Malvita    12/8/2024    21:28
Perkap    Malvita    12/8/2024    21:29
Perkap    Malvita    12/8/2024    21:30
Perkap    Malvita    12/8/2024    21:30
Perkap    Malvita    12/8/2024    21:30
Perkap    Malvita    12/8/2024    21:31
Perkap    Malvita    12/8/2024    21:32
Perkap    Malvita    12/8/2024    21:33
Perkap    Malvita    12/8/2024    21:34
Perkap    Malvita    12/8/2024    21:35
Perkap    Malvita    12/8/2024    21:36
Perkap    Malvita    12/8/2024    21:36
Perkap    Malvita    12/8/2024    21:37
Permac    Malvita    12/8/2024    21:37
Perkap    Malvita    12/8/2024    21:39
Perkap    Malvita    12/8/2024    21:39
Perkap    Malvita    12/8/2024    21:39
Perkap    Malvita    12/8/2024    21:41
Perkap    Malvita    12/8/2024    21:41
Perkap    Malvita    12/8/2024    21:42
Perkap    Malvita    12/8/2024    21:43
Perkap    Malvita    12/8/2024    21:43
Perkap    Malvita    12/8/2024    21:44
Perkap    Malvita    12/8/2024    21:46
Perkap    Malvita    12/8/2024    21:47
Perkap    Malvita    12/8/2024    21:49
Perkap    Malvita    12/8/2024    21:49
Perka

Re: [R] Mutate issue help needed

2024-12-17 Thread John Kane
I did a quick clean-up and deleted a couple of , I hope, library calls and
I think the OP's code should look like this
==

# Load packages & set ggplot theme 

library(tidyverse)
theme_set(theme_bw())

# Select dataset and assign name to "All" ???
---

fname <- "Buzz.txt"

All<- fname

# Function for time labels: This uses Night and Time for X-Y labels


evening <- function(datetime) {
update(datetime
   , yday = yday(datetime) - if_else(am(datetime), 1, 0)
   , hour = 17
   , minute = 0
   , second = 0

) }

# Create labels and corresponding breaks for the time in seconds f 

label_hours = c("17:00", "18:00", "19:00", "20:00", "21:00", "22:00",
"23:00", "00:00", "01:00", "02:00", "03:00", "04:00",
"05:00", "06:00")

break_hours = c(0, 1:13*3600)


# Fix data column, combine  date hour/min -
# Calculate elapsed time from 17:00 in seconds

polished <- All %>%
mutate( Date = as.Date(Date, "%m/%d/%Y")
, datetime = as.POSIXct(paste(Date, Time, sep = " ","%Y-%m-%d
%H:%M"),
   tz = "UTC")
   , evening = evening(datetime)
 , Night = format(as.Date(evening), "%b %d, %Y")
 , Time = as.double(datetime - evening, "secs")
   )*

ggplot(polished, aes(x = Night, y = Time, colour = Species)) +
  geom_point() + scale_colour_hue(l=40) +
  ggtitle(label = 'Feeding buzz temporal activity')+
  facet_grid(. ~ Night) + facet_wrap(facets = ~Species)+
  scale_y_continuous(labels = label_hours, breaks = break_hours) +
  theme(axis.text.x = element_text(angle = 270))

=

On Tue, 17 Dec 2024 at 11:51, Jeff Newmiller via R-help <
r-help@r-project.org> wrote:

> Posting Error. OP sent HTML email which by default  includes a backup text
> version with "helpful" marks where formatting was in the original, and the
> mailing list deleted the HTML (per policy stated in the posting guide
> linked at the bottom of every email) which effectively leaves the mailing
> list recipients guessing as to what was originally sent.
>
> Correct configuration of OPs email client (sometimes required for each and
> every email) will send plain text which doesn't support formatting but at
> least the recipient and sender would be looking at the same text. We don't
> know what email client they are using and it is off-topic to discuss
> specific details of email client software on this mailing list.
>
> On December 17, 2024 8:31:28 AM PST, CALUM POLWART 
> wrote:
> >Am I being "thick" here
> >..
> >
> >mutate(data, *# text
> >
> >Is interpretated as mutate (data, *
> >
> >The star is the character...
> >
> >(Data is the line above being piped)
> >
> >Why have the comments been *'d?. Is that the source error or a posting
> >error here?
> >
> >On Tue, 17 Dec 2024, 14:57 Ivan Krylov via R-help, 
> >wrote:
> >
> >> В Tue, 17 Dec 2024 06:44:50 -0700
> >> Neotropical bat risk assessments  пишет:
> >>
> >> > fname <- "Buzz.txt"
> >>
> >> > All<- fname
> >>
> >> I think the code needs a call to read.table() or another function to
> >> read your data here. 'All' is still a string containing the name of the
> >> file, not its contents.
> >>
> >> > All %>%
> >> > mutate(*#convert Date from chr to Date*
> >>
> >> This call expects 'All' to contain a data.frame-like object, not a file
> >> name.
> >>
> >> HTML-based bold text doesn't work on this mailing list, so to make it
> >> easier for other people to copy & paste executable code from your
> >> messages, I would recommend composing in plain text:
> >> https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html
> >>
> >> --
> >> Best regards,
> >> Ivan
> >>
> >> __
> >> 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
> >> https://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >>
> >
> >   [[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
> https://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
> --
> Sent from my phone. Please excuse my brevity.
>
> __
> 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
> https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 

Re: [R] Mutate issue help needed

2024-12-17 Thread Jeff Newmiller via R-help
Posting Error. OP sent HTML email which by default  includes a backup text 
version with "helpful" marks where formatting was in the original, and the 
mailing list deleted the HTML (per policy stated in the posting guide linked at 
the bottom of every email) which effectively leaves the mailing list recipients 
guessing as to what was originally sent.

Correct configuration of OPs email client (sometimes required for each and 
every email) will send plain text which doesn't support formatting but at least 
the recipient and sender would be looking at the same text. We don't know what 
email client they are using and it is off-topic to discuss specific details of 
email client software on this mailing list.

On December 17, 2024 8:31:28 AM PST, CALUM POLWART  wrote:
>Am I being "thick" here
>..
>
>mutate(data, *# text
>
>Is interpretated as mutate (data, *
>
>The star is the character...
>
>(Data is the line above being piped)
>
>Why have the comments been *'d?. Is that the source error or a posting
>error here?
>
>On Tue, 17 Dec 2024, 14:57 Ivan Krylov via R-help, 
>wrote:
>
>> В Tue, 17 Dec 2024 06:44:50 -0700
>> Neotropical bat risk assessments  пишет:
>>
>> > fname <- "Buzz.txt"
>>
>> > All<- fname
>>
>> I think the code needs a call to read.table() or another function to
>> read your data here. 'All' is still a string containing the name of the
>> file, not its contents.
>>
>> > All %>%
>> > mutate(*#convert Date from chr to Date*
>>
>> This call expects 'All' to contain a data.frame-like object, not a file
>> name.
>>
>> HTML-based bold text doesn't work on this mailing list, so to make it
>> easier for other people to copy & paste executable code from your
>> messages, I would recommend composing in plain text:
>> https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html
>>
>> --
>> Best regards,
>> Ivan
>>
>> __
>> 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
>> https://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>   [[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 https://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.

__
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 https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Mutate issue help needed

2024-12-17 Thread CALUM POLWART
Am I being "thick" here
..

mutate(data, *# text

Is interpretated as mutate (data, *

The star is the character...

(Data is the line above being piped)

Why have the comments been *'d?. Is that the source error or a posting
error here?

On Tue, 17 Dec 2024, 14:57 Ivan Krylov via R-help, 
wrote:

> В Tue, 17 Dec 2024 06:44:50 -0700
> Neotropical bat risk assessments  пишет:
>
> > fname <- "Buzz.txt"
>
> > All<- fname
>
> I think the code needs a call to read.table() or another function to
> read your data here. 'All' is still a string containing the name of the
> file, not its contents.
>
> > All %>%
> > mutate(*#convert Date from chr to Date*
>
> This call expects 'All' to contain a data.frame-like object, not a file
> name.
>
> HTML-based bold text doesn't work on this mailing list, so to make it
> easier for other people to copy & paste executable code from your
> messages, I would recommend composing in plain text:
> https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html
>
> --
> Best regards,
> Ivan
>
> __
> 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
> https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[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 https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Mutate issue help needed

2024-12-17 Thread John Kane
I think we need to see some sample data. As it stands, as Ivan says "All"
in just a character string.
A handy way to supply data is to use the dput() function. Do dput(mydata)
where "mydata" is the name of your dataset. For really large datasets
probably dput(head(mydata, 100)) will do.
Just paste the output here.



On Tue, 17 Dec 2024 at 09:57, Ivan Krylov via R-help 
wrote:

> В Tue, 17 Dec 2024 06:44:50 -0700
> Neotropical bat risk assessments  пишет:
>
> > fname <- "Buzz.txt"
>
> > All<- fname
>
> I think the code needs a call to read.table() or another function to
> read your data here. 'All' is still a string containing the name of the
> file, not its contents.
>
> > All %>%
> > mutate(*#convert Date from chr to Date*
>
> This call expects 'All' to contain a data.frame-like object, not a file
> name.
>
> HTML-based bold text doesn't work on this mailing list, so to make it
> easier for other people to copy & paste executable code from your
> messages, I would recommend composing in plain text:
> https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html
>
> --
> Best regards,
> Ivan
>
> __
> 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
> https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
John Kane
Kingston ON Canada

[[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 https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Mutate issue help needed

2024-12-17 Thread Ivan Krylov via R-help
В Tue, 17 Dec 2024 06:44:50 -0700
Neotropical bat risk assessments  пишет:

> fname <- "Buzz.txt"
 
> All<- fname

I think the code needs a call to read.table() or another function to
read your data here. 'All' is still a string containing the name of the
file, not its contents.

> All %>%
> mutate(*#convert Date from chr to Date*

This call expects 'All' to contain a data.frame-like object, not a file
name.

HTML-based bold text doesn't work on this mailing list, so to make it
easier for other people to copy & paste executable code from your
messages, I would recommend composing in plain text:
https://stat.ethz.ch/pipermail/r-help/2024-December/480371.html

-- 
Best regards,
Ivan

__
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 https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.