Questions tagged as 'r'

1
answer

Graphic ggplot x axis

This is my data.frame: datamatrix=structure(list(month = c(1980, 1980.08333333333, 1980.16666666667, 1980.25, 1980.33333333333, 1980.41666666667, 1980.5, 1980.58333333333, 1980.66666666667, 1980.75, 1980.83333333333, 1980.91666666667, 1...
asked by 20.12.2016 / 14:17
1
answer

How to join two csv files in R?

My problem is this: I have two csv data files with the same number of columns and the same column names (see below). I ask you to read the files as follows: > dados_1 <- read.csv("Teste_01.csv") > dados_2 <- read.csv("Teste_02.csv"...
asked by 09.10.2016 / 20:07
1
answer

How to exclude observations and variables in an array in R?

The situation is as follows: I have an array with 271 observations and 14 variables in R. I need to randomly exclude a number of crosses and variables, keeping the order of the remaining crosses and adding NA's at the excluded crosses. At the...
asked by 19.03.2017 / 00:45
1
answer

Color a region of the chart

I would like to color only the region within the circle, but I can not. The program and the image are: theta <- seq(0, 2 * pi, length = 200) r = exp(1i*theta) fx=function(r) { x = r-1 return (x) } xi = fx(r) plot(xi)     
asked by 16.09.2016 / 06:34
2
answers

Bar chart - ggplot2

I have a date-frame with the structure below. I want to make a simple bar chart that lists the "CID" by type (A, B, C, etc ...) with the days of removal and the other with the Meetings. df <- data.frame(CID = c("A", "A", "B", "C", "C", "Z")...
asked by 06.08.2016 / 13:58
1
answer

How to check if a (variable) column exists inside a 'data.frame'?

I need to check for columns (or variables) within data.frame before doing any operation, but the passed variable is not in string to compare with colnames or names . > Follow the code: check_measurement_ages = func...
asked by 27.09.2016 / 08:15
1
answer

Function to read file via ODBC

Hello, it must be a very simple problem, but I have already looked a lot and I could not find a solution to my question. My configuration is: R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows...
asked by 11.01.2017 / 13:23
1
answer

Regular expression strsplit

How do you assign E.R to separate the name of the city? cid <- c(cidade1..SP.Brasil,cidade2...SP.Brasil,cidade3..SPDF.Brasil,cidade4...SPDF.Brasil) In the sublime, for example, this works: \.{3}[A-Z]{4}|\.{3}[A-Z]{2}|\.{2}[A-Z]{4}|\.{2...
asked by 13.01.2017 / 13:42
1
answer

How to merge BibTex files into R

How can I merge several .bib extension files into one single file in R? I'm learning how to use the Bibliometrix package, and I need to merge 99 .bib files into a single file. Thanks, guys.     
asked by 08.07.2016 / 22:23
1
answer

How to remove columns from a data frame?

I have this date frame with 275 variables and would like to remove variables that are not contributing significantly (that have non-zero value less than 10 times). Can anyone help me?     
asked by 05.12.2016 / 18:22