Solution for error message in R for pasting Excel data from clipboard (pipe(‘pbpaste’) )

One of the quickest ways in R to get data into it is to copy to the clipboard then paste it into a variable.

This can be done in Windows by

read.table("clipboard", header=T)

The exact same function can be done on a MAC computer with

read.table(pipe("pbpaste"), header=T)

However, in the MAC a red warning message appears like this

Screenshot 2018-02-14 19.09.54

What seems to be happening is that R seems to read the clipboard with a missing closing line to the table. This also happens with files. Although the warning message does not seem to affect the data and can be ignored, it is annoying. So if you really want to see this message disappear, you can:

  1. copy the data from MS Excel
  2. paste into then copy the data from MS Word
  3. paste into R with read.table(pipe("pbpaste"), header=T)

This seems to do the trick when nothing else seems to work. While this is not the most elegant and ideal solution, it is a solution. Enjoy.

Clipboard hack for R in MAC

When I first started using the statistical software R for statistics I had started on a Windows computer. For here the copying and pasting function is

read.table("clipboard", header=T)

The exact same function on a MAC computer is

read.table(pipe("pbpaste"), header=T)

Simple as that. I’d someone had told me this much earlier.

In praise of lexicogrammar

Lexicogrammar is not a word you hear much but those of a certain following – cognitive linguists, functional grammarians, etc – use this word to describe what is traditionally call vocabulary and grammar as one system rather than being two separate systems.

As a researcher in prepositions this is a big deal. It means I (can) treat prepositions as vocabulary, requiring them to be learnt by students when before they were and still are somewhat relegated to the category of grammar. Vocabulary and grammar should not be studied separately. Vocabulary are not individual words to be studied, or looked up when you don’t know the word. Vocabulary only have full function within a sentence, and shine bright within the context of use within communication. Certainly, in Saussurean linguistics the signifier/signified duality of words are an important and enlightening feature. But words are best understood in communicative units, namely sentences. And Saussure will not have argued against that. In fact he argued for it.

Undoubtedly dictionaries are useful tools. But they generally push the learner to think of words as separate objects with separate meanings. Good dictionaries will give plenty of examples of usage but students will generally use the cheapest or most handy dictionary at hand. Today this is the smartphone dictionary and translator. Rarely do they give examples. And for most of the time they give one translation to one word, suppressing the multiple nuanced (often schematically-related) meanings that most words have. I shall talk about this point in another post.

Form and meaning in linguistics

Form in linguistics and language refers to the symbols used to represent meaning. Each form has a particular meaning in a particular context. This cannot be stressed enough. It implies that a form can have different meanings in different contexts. However, the range of meanings for a form is usually limited to a prototype or prototypes based around an image schema to a set of extensions. This is referred to as polysemy (think of the different meanings listed in a dictionary of a particular word).

Note that the relationship of the form to meaning is largely arbitrary. This is quite easily proven to be true. Firstly, if meaning is linked to form then naturally all languages will have the same form for the exact same meaning. This is obviously not true by observation of any two language. Secondly, meaning changes over time for a form. An example of this is ‘gay’. Two hundred years ago this word had meant ‘happy’. Today it signifies a social group. Furthermore, ‘gay’ no longer has negative connotations that it did just 30 years ago.

But in linguistics, it is not form and meaning but form-meaning, one word. The proper terms used for form-meaning, form and meaning are sign, signifier and signified respectively.

Finally, signs can represent either real things or imaginary concepts. As long as these things or concepts are considered coherent they can be given a form, and turned into a sign by a language community.

Sometimes the adverb is obligatory and unmovable

Consider this sentence:

(1) He put the bag down.

The parts of the sentence are He (S) / put (V) / the bag (O) / down (A). The removal of A (adverbial) would render the sentence incomplete. In other words, the A is obligatory.

Some teachers call this sentence SVO but that would make “the bag down” the object of the sentence, which of course is not true. It is true the V and A make a set. We can see this by rearranging the syntax elements to

(2) He put down the bag.

By doing so we can explain it as SVO where put down is the single unit of V. A problem arises when the A is a longer element, and cannot be moved easily like (2). For example,

(3) He put the bag on the overhead baggage shelf.

is a perfectly good sentence and again it is SVOA. But if we try to rearrange it as in (3a)

(3a) He put on the overhead baggage shelf the bag.

we find the sentence to be clumsy and unnatural.

For this reason it is better to teach SVOA rather than try to slim the sentence patterns to less for the sake of brevity. Sometimes this can be too much to be useful.

Finding the subject of a sentence

Perhaps the biggest problem with understanding long sentences is that they seem to be a lot longer than the basic syntax unit. Today we accept that there are seven basic sentence pattern types, where the possible number of obligatory units is between 2 and 4 (SVOC, SVOO and SVOA). Yet a sentence with, for example, eleven words seem difficult to fit into this pattern. The secret is to chunk them into units. Take the following sentence:

A lot of Carp fans are standing by the back entrance.

What is the subject? We know the subject of a sentence is a person (who) or a thing (what). And that in this case “standing” implies a person or people. So ask the question:

Who is (or who are) standing by the back entrance?

The answer is of course Carp fans. If in doubt the entire chunk ‘a lot of Carp fans’ would also be fine to be called the subject.


Incidentally, if you want to know what is the pattern type just think about what is necessary within the sentence.

In the above sentence almost every word is necessary. The only words which can be cut are ‘a lot of’, ‘Carp’ and ‘back’ which gives us

Fans are standing by the entrance.

Words which help nouns are called ‘adjectives’ and are mostly “decorative”. The remainder of the sentence therefore tells all that we need to know, that there are fans and they are standing (implying waiting) by the entrance. This is an SVA sentence. You can say

The fans are standing. 

but that would have a different meaning not implying waiting. Therefore by the entrance is obligatory.

Let it be – words are meant to be “lost”

Charles Darwin would have made a great linguist. In his thinking of life and evolution it is not someone who decides on what survives and what dies. It the larger mechanism of existence that “decides” so. Similarly, words should survive if there is a need for it to do so, not to be forced so because a small group of “elite” thinkers deem it so. If by argument these people can convince the world that it is important for a word to survive then so be it. Those words have a value within the larger picture of a language. But when words that have been lost they should not be revived just because someone has a fetish for signs.

I truly doubt the linguistic survival of ‘snout-fair’ would have any communicative value in English. There are so many other words which could probably give the same nuance. But truly do we need this word in the first place any more that we need a word for ‘man-love’, whatever that would mean.

To give one more analogy trying keep a dying word alive is like continuing to keep a dying medical patient on a life-support just for the benefit of others without regard for the patient’s quality of life (note: there are many cases in which life-support will save an important life). If words are outdated or fall out disuse then there must a reason for it to become so. No amount of life-support will 1) save them, or 2) make the world a better place (as cold-hearted this statement may seem) by them being here.

One

1.
There is something to be said about linguistic determinism, and in particular relativity. Linguistic relativity says that the form or structure of a language influences the way people think, or world-view. The often quoted example is the Inuit people and the words for “snow”. Whereas in English we have snow (and perhaps sleet and slush) the Inuit have at least nine different words for different types of snow. Because of this the Inuits have a “greater” understanding and knowledge of snow and their conditions.

But is this absolutely necessarily true?

The idea that language reflects your thought is better described as relative rather than absolute. If the relationship is absolute then all people of a language will think in exactly the same way.  But this is not true. A talk to two people from the same culture will quickly reveal that people do think differently. And you would be hard pushed to even say there are two people who are exactly identical in their way of thought. Even biological twins who are genetically the same are different in their thoughts and likes. Experience from a first-person or one-person point-of-view will guarantee that we will be different no matter what.

2.
English is a language which takes pains to highlight “one over many”. It is one of the languages which have difference morphological form for the singular and the plural (or not-singular). Is it natural to give the singular priority? Arabic has forms for “one”, “two” and “plural”. And Japanese does not differentiate between singular and plural at all.  Nor does Chinese for that matter. So grammar is really a creation of the mind, of people, to make communication possible. The rules are not set in stone or in the mind as some would like you to believe. As humans we make do with what we have – the physical world – to do things like communication.

In fact all we can do is ‘make do’. But it is important to see that making do with something does not mean it is the only way to the same thing. There is no reason for ‘one’ to be given priority over not ‘one’ … except for may be it is the first thing in an order.

Grammar or experience?

What is wrong with the idea of “universal” in the Universal Grammar of Chomsky? It is that what is taken as being universal is wrong. It is not the grammar in the brain that is universal, but rather it is the human experience that is universal. We all have the same set of senses and mental faculty. We all input the same kinds of sensory and perceptive experience. But we also have the same kinds of choices and decisions to make about language which do not necessarily need to be a brain-module specific to operate. 

“Language is transformational” is partly correct, but it is probably at a more a general rather than being a specific mechanism that uses the properties of reality, sound and image to produce what is language. Certainly we are creatures who like to express themselves and to communicate with other creatures. We are undoubtedly social creatures. 

heaviness of rain

more than white noise
the drone continues
through the night

in dark sleep
the overflow gutters
my one exposed ear
until light reveals
the heaviness
of the rain

frogs frolic wetly
green suits shining
and birds shelter
in the eaves
leaving reluctantly 
at my presence
as warnings come
over the air waves