[R] what constitutes a 'complete sentence'?

peter dalgaard pdalgd at gmail.com
Tue Jul 7 12:20:38 CEST 2015


...except that there is not necessarily a verb either. What we're looking for is something like "advertisement style" as in 

UGLY MUGS 7.95. 

An invaluable addition to your display cabinet. Comes in an assortment of warts and wrinkles, crafted by professional artist Foo Yung.

However, I'm drawing blanks when searching for an established term for it.

Could we perhaps sidestep the issue by requesting a "single descriptive paragraph, with punctuation" or thereabouts?

----

I'm still puzzled about what threw Federico's example in the first place. The actual code is 

    if(strict && !is.na(val <- db["Description"])
       && !grepl("[.!?]['\")]?$", trimws(val)))
        out$bad_Description <- TRUE

and  I can do this

> strict <- TRUE
> db <- tools:::.read_description("/tmp/dd")
>    if(strict && !is.na(val <- db["Description"])
+        && !grepl("[.!?]['\")]?$", trimws(val)))
+         out$bad_Description <- TRUE
> out
Error: object 'out' not found

I.e., the complaint should _not_ be triggered. I suppose that something like a non-breakable space at the end could confuse trimws(), but beyond that I'm out of ideas.


On 07 Jul 2015, at 03:28 , John Fox <jfox at mcmaster.ca> wrote:

> Dear Peter,
> 
> I think that the grammatical term you're looking for is "verb phrase."
> 
> Best,
> John
> 
> On Tue, 7 Jul 2015 00:12:25 +0200
> peter dalgaard <pdalgd at gmail.com> wrote:
>> 
>>> On 06 Jul 2015, at 23:19 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>>> 
>>> On 06/07/2015 5:09 PM, Rolf Turner wrote:
>>>> On 07/07/15 07:10, William Dunlap wrote:
>>>> 
>>>> [Rolf Turner wrote.]
>>>> 
>>>>>> The CRAN guidelines should be rewritten so that they say what they *mean*.
>>>>>> If a complete sentence is not actually required --- and it seems abundantly clear
>>>>>> that it is not --- then guidelines should not say so.  Rather they should say,
>>>>>> clearly and comprehensibly, what actually *is* required.
>>>>> 
>>>>> This may be true, but also think of the user when you write the description.
>>>>> If you are scanning a long list of descriptions looking for a package to
>>>>> use,
>>>>> seeing a description that starts with 'A package for' just slows you down.
>>>>> Seeing a description that includes 'designed to' leaves you wondering if the
>>>>> implementation is woefully incomplete.  You want to go beyond what CRAN
>>>>> can test for.
>>>> 
>>>> All very true and sound and wise, but what has this got to do with 
>>>> complete sentences?  The package checker issues a message saying that it 
>>>> wants a complete sentence when this has nothing to do with what it 
>>>> *really* wants.
>>> 
>>> That's false.  If you haven't given a complete sentence, you might still
>>> pass, but if you have, you will pass.  That's not "nothing to do" with
>>> what it really wants, it's just an imperfect test that fails to detect
>>> violations of the guidelines.
>>> 
>>> As we've seen, it sometimes also makes mistakes in the other direction.
>>> I'd say those are more serious.
>>> 
>>> Duncan Murdoch
>>> 
>> 
>> Ackchewly....
>> 
>> I don't think what we want is what we say that we want. A quick check suggests that many/most packages use "headline speech", as in "Provides functions for analysis of foo, with special emphasis on bar.", which seems perfectly ok.  As others have indicated, prefixing with "This package" would be rather useless. However, I'm at a loss as to how to describe what it is that we want, much less how to translate it to a dozen other languages. 
>> 
>> -pd
>> -- 
>> Peter Dalgaard, Professor,
>> Center for Statistics, Copenhagen Business School
>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
>> 
>> ______________________________________________
>> R-help at 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.
> 
> 
> 	

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list