diff --git a/KorAPClient/__init__.py b/KorAPClient/__init__.py
index 9add34b..3de5813 100644
--- a/KorAPClient/__init__.py
+++ b/KorAPClient/__init__.py
@@ -3,8 +3,15 @@
 import rpy2.robjects.packages as packages
 import rpy2.robjects.pandas2ri as pandas2ri
 from rpy2.robjects.methods import RS4
+from packaging import version
+import warnings
+
+CURRENT_R_PACKAGE_VERSION = "0.6.1"
 
 KorAPClient = packages.importr('RKorAPClient')
+if version.parse(KorAPClient.__version__) < version.parse(CURRENT_R_PACKAGE_VERSION):
+    warnings.warn("R-package RKorAPClient version " + KorAPClient.__version__  + " is outdated, please update.", DeprecationWarning)
+
 pandas2ri.activate()
 
 
@@ -80,6 +87,38 @@
         """
         return KorAPClient.frequencyQuery(self, *args, **kwargs)
 
+    def collocationScoreQuery(self, *args, **kwargs):
+        """Query relative frequency of search term(s).
+
+        - **query** - query string or list of query strings
+        - **vc** - virtual corpus definition or list thereof  (default: "")
+        - **conf.level** - confidence level of the returned confidence interval (default = 0.95)
+        - **as.alternatives** - decides whether queries should be treated as mutually exclusive and exhaustive wrt. to some meaningful class (e.g. spelling variants of a certain word form) (default = False)
+        - **KorAPUrl** - instead of specifying the `query` and `vc` string parameters, you can copy your KorAP query URL here from the browser
+        - **metadataOnly** - determines whether queries should return only metadata without any snippets. This can also be useful to prevent access rewrites. (default = True)
+        - **ql** - query language: `"poliqarp" | "cosmas2" | "annis" | "cql" | "fcsql"` (default = `"poliqarp"`)
+        - **accessRewriteFatal** - abort if query or given vc had to be rewritten due to insufficient rights (not yet implemented) (default = `True`)
+        - **verbose** - (default = `self.verbose`)
+        - **expand** - bool that decides if `query` and `vc` parameters are expanded to all of their combinations (default = `len(vc) != len(query)`)
+
+        Returns:
+            DataFrame with columns `'query', 'totalResults', 'vc', 'webUIRequestUrl', 'total', 'f',
+           'conf.low', 'conf.high'`.
+
+        Example:
+            ```
+            $ kcon = KorAPConnection(verbose=True)
+            $ kcon.frequencyQuery("Ameisenplage", vc=["pubDate in "+str(y) for y in range(2010,2015)])
+                                  query  totalResults  ...      conf.low     conf.high
+            1  Ameisenplage             3  ...  9.727696e-10  1.200289e-08
+            2  Ameisenplage            12  ...  3.838218e-09  1.275717e-08
+            3  Ameisenplage             5  ...  2.013352e-09  1.356500e-08
+            4  Ameisenplage             6  ...  2.691331e-09  1.519888e-08
+            5  Ameisenplage             3  ...  8.629463e-10  1.064780e-08
+            ```
+        """
+        return KorAPClient.collocationScoreQuery(self, *args, **kwargs)
+
     def corpusQuery(self, *args, **kwargs):
         """Query search term(s).
 
diff --git a/KorAPClient/tests/test_korapclient.py b/KorAPClient/tests/test_korapclient.py
index 6e25013..6d19af6 100644
--- a/KorAPClient/tests/test_korapclient.py
+++ b/KorAPClient/tests/test_korapclient.py
@@ -15,6 +15,14 @@
         self.assertGreater(df['totalResults'][0], 10)
         self.assertGreater(10000, df['totalResults'][0])
 
+    def test_collocation_score_query(self):
+        df = self.kcon.collocationScoreQuery("Ameisenplage", "heimgesucht", leftContextSize=0, rightContextSize=1)
+        self.assertEquals(df['rightContextSize'][0], 1)
+        self.assertGreater(df['logDice'][0], 1)
+        self.assertGreater(df['pmi'][0], 10)
+        self.assertLess(df['pmi'][0], 20)
+
+
     def test_corpus_stats(self):
         df = self.kcon.corpusStats(**{"as.df": True})
         self.assertGreater(df['tokens'][0], 10**10)
