You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running larger blocks (approximately 30+ lines) of selected text in integrated terminal using "Terminal: Run Selected Text in Active Terminal" will repeat, omit, or reorganize the original input. I've encountered this problem with a clean install of vs code in both R and python scripts.
For example, if I select and run the R script below:
library(datasets)
data(iris)
library(dplyr)
summary(iris)
names(iris) <- tolower(names(iris))
# filter() the data for species virginica
virginica <- filter(iris, species == "virginica")
head(virginica) # This dispalys the first six rows
# select() the specified columns
selected <- select(iris, sepal.length, sepal.width, petal.length)
# select all columns from sepal.length to petal.length
selected2 <- select(iris, sepal.length:petal.length)
head(selected, 3)
# selected and selected2 are exactly the same
identical(selected, selected2)
# create a new column that stores logical values for sepal.width greater than half of sepal.length
newCol <- mutate(iris, greater.half = sepal.width > 0.5 * sepal.length)
tail(newCol)
# arrange()
newCol <- arrange(newCol, petal.width)
head(newCol)
# The chain operator, or the pipeline %>%
# This will first filter, and then arrange our data. Note that here the order in which you call functions does not matter, but in other cases it might
arr.virg <- newCol %>% filter(species == "virginica") %>% arrange(sepal.width)
arr.virg[30:35,] # will show us rows 30 through 35 and all columns
# You can also arrange in descending order using desc() on what you arrange by
# arrange(desc(sepal.width))
# summarise()
summarise(arr.virg, mean.length = mean(sepal.length, na.rm = TRUE))
I get the following output:
> # The chain operator, or the pipeline %>%
> # This will first filter, and then arrange our data. Note that here the order in which you call functions does not matter, but in other cases it might
> arr.virg <- newCol %>% filter(species arr.virg <- ne) %>% arrange(sepal.width)
Error: unexpected symbol in "arr.virg <- newCol %>% filter(species arr.virg"
> arr.arr.arr.35,] #arr.arr.arr.35,] #arr.arr.arr.35,]nd arr.arr.arr.35,] #arr.arr.arr.35,] #ar desarr.arr.arr.35,] #arr.arr.arr.35,] #arr.arrnge by
Error: unexpected ',' in "arr.arr.arr.35,"
> # arrange(desc(sepal.width))
> # summarise()
> summarisesummarisesummarisesummarisean(sepal.length, na.rm = TRUE))
Error: unexpected ')' in "summarisesummarisesummarisesummarisean(sepal.length, na.rm = TRUE))"
It looks like the amount of text sent starts to break after this comment:
# This will first filter, and then arrange our data. Note that here the order in which you call functions does not matter, but in other cases it might
What's interesting is that if I delete four lines of comments, code, or empty lines, the problem goes away. It seems as though there's a limit to the amount of text that can be sent using "Terminal: Run Selected Text in Active Terminal". As a data scientist, this is a feature that is critical to my workflow, as I run a lot of code interactively. Other text editors (Sublime Text, R Studio, Spyder) seem to handle this feature very nicely, however, the allure of VS code is providing a single feature rich environment for data science, as opposed to using different text editors/IDEs for different languages. I would really like VS code to be my first choice. Thank you for your time.
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered:
Steps to Reproduce:
For example, if I select and run the R script below:
I get the following output:
It looks like the amount of text sent starts to break after this comment:
What's interesting is that if I delete four lines of comments, code, or empty lines, the problem goes away. It seems as though there's a limit to the amount of text that can be sent using "Terminal: Run Selected Text in Active Terminal". As a data scientist, this is a feature that is critical to my workflow, as I run a lot of code interactively. Other text editors (Sublime Text, R Studio, Spyder) seem to handle this feature very nicely, however, the allure of VS code is providing a single feature rich environment for data science, as opposed to using different text editors/IDEs for different languages. I would really like VS code to be my first choice. Thank you for your time.
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: