rstudio

Alignment of images in tables with markdown, rstudio and knitr

China☆狼群 提交于 2021-02-08 10:17:22
问题 I'm trying to create a standard monthly report for work in PDF format using Rstudio and I want to incorporate ggplot output with a table of figures - a new chart, one per cell on each row. I'm new to markdown, latex, pandoc and knitr so this is a bit of minefield for me. I have found out how to insert the charts using kable but the images are not aligned with the text on the same row. I've put some (rstudio markdown) code using dummy data at the bottom of my question, and here are some images

No module named 'rpytools'?

泄露秘密 提交于 2021-02-08 08:20:14
问题 I'm trying to work with the reticulate library in R. I used the "functions.py" example to test it out: # functions.py file def add(x, y): return x + y In R studio (Version 3.5.2), this is what I have: library(reticulate) source_python('functions.py') However, this returns an error: Error in py_set_attr_impl(x, name, value) : Evaluation error: ModuleNotFoundError: No module named 'rpytools'. So I'm stuck here. If it helps, I'll also share that my Python is 64-bit and version 3.6.5. Anyone know

No module named 'rpytools'?

拜拜、爱过 提交于 2021-02-08 08:14:09
问题 I'm trying to work with the reticulate library in R. I used the "functions.py" example to test it out: # functions.py file def add(x, y): return x + y In R studio (Version 3.5.2), this is what I have: library(reticulate) source_python('functions.py') However, this returns an error: Error in py_set_attr_impl(x, name, value) : Evaluation error: ModuleNotFoundError: No module named 'rpytools'. So I'm stuck here. If it helps, I'll also share that my Python is 64-bit and version 3.6.5. Anyone know

Error while loading tidyverse in RStudio

こ雲淡風輕ζ 提交于 2021-02-07 20:31:49
问题 When trying to load the tidyverse package in RStudio, I get the following error message: library(tidyverse) Error: package or namespace load failed for ‘tidyverse’: .onAttach failed in attachNamespace() for 'tidyverse', details: call: NULL error: Function getThemeInfo not found in RStudio 回答1: I found that upgrading RStudio to version 1.1.383 resolved the problem for me, while still running the latest version of tidyverse. 回答2: I had the same issue, and wolfgang's answer solved it. I used the

Spark error - Decimal precision 39 exceeds max precision 38

拜拜、爱过 提交于 2021-02-07 19:34:20
问题 When I try to collect data from Spark dataframe, I get an error stating "java.lang.IllegalArgumentException: requirement failed: Decimal precision 39 exceeds max precision 38". All the data which is in Spark dataframe is from Oracle database, where I believe decimal precision is <38. Is there any way I can achieve this without modifying the data? # Load required table into memory from Oracle database df <- loadDF(sqlContext, source = "jdbc", url = "jdbc:oracle:thin:usr/pass@url.com:1521" ,

Spark error - Decimal precision 39 exceeds max precision 38

守給你的承諾、 提交于 2021-02-07 19:31:45
问题 When I try to collect data from Spark dataframe, I get an error stating "java.lang.IllegalArgumentException: requirement failed: Decimal precision 39 exceeds max precision 38". All the data which is in Spark dataframe is from Oracle database, where I believe decimal precision is <38. Is there any way I can achieve this without modifying the data? # Load required table into memory from Oracle database df <- loadDF(sqlContext, source = "jdbc", url = "jdbc:oracle:thin:usr/pass@url.com:1521" ,

Spark error - Decimal precision 39 exceeds max precision 38

家住魔仙堡 提交于 2021-02-07 19:31:24
问题 When I try to collect data from Spark dataframe, I get an error stating "java.lang.IllegalArgumentException: requirement failed: Decimal precision 39 exceeds max precision 38". All the data which is in Spark dataframe is from Oracle database, where I believe decimal precision is <38. Is there any way I can achieve this without modifying the data? # Load required table into memory from Oracle database df <- loadDF(sqlContext, source = "jdbc", url = "jdbc:oracle:thin:usr/pass@url.com:1521" ,

How to read all files in S3 folder/bucket using sparklyr in R?

只谈情不闲聊 提交于 2021-02-07 17:24:30
问题 I have tried below code & its combinations in order to read all files given in a S3 folder , but nothing seems to be working .. Sensitive information/code is removed from the below script. There are 6 files each with 6.5 GB . #Spark Connection sc<-spark_connect(master = "local" , config=config) rd_1<-spark_read_csv(sc,name = "Retail_1",path = "s3a://mybucket/xyzabc/Retail_Industry/*/*",header = F,delimiter = "|") # This is the S3 bucket/folder for files [One of the file names Industry_Raw

Cursor shifted from position

▼魔方 西西 提交于 2021-02-07 12:27:17
问题 On a given line of the RStudio console or script writing area, the cursor as it flashes on the screen is shifted from its true position, where text is inserted. Say I want to delete a character on a given line. I click right in front of it, and the red cursor flashes where it should. But when I press backspace, the character six spots to the left gets deleted instead. This behaviour gets worse as the line goes on, so near the end of a long line, the offset is of 13 characters while it is only

Cursor shifted from position

♀尐吖头ヾ 提交于 2021-02-07 12:27:06
问题 On a given line of the RStudio console or script writing area, the cursor as it flashes on the screen is shifted from its true position, where text is inserted. Say I want to delete a character on a given line. I click right in front of it, and the red cursor flashes where it should. But when I press backspace, the character six spots to the left gets deleted instead. This behaviour gets worse as the line goes on, so near the end of a long line, the offset is of 13 characters while it is only