Skip to content
Back to formatted view

Raw Message

Message-ID: <1932751023.1279015.1633747210908@mail.yahoo.com>
Date: 2021-10-09T02:40:10Z
From: Suharto Anggono Suharto Anggono
Subject: formatC(<zero-length>) doesn't keep attributes

By r80949, 'formatC' code in R devel has
? ? if (!(n <- length(x))) return(character())

If 'x' has length zero, the return value of 'formatC' doesn't have attributes. It doesn't follow the documented "Value": "A character object of the same size and attributes as x".

Based on my observation, the early return could be removed.
    n <- length(x)