Questions tagged as 'r'

1
answer

Convert character accurately

Considering that the content of a certain variable is "001" class character . I need to convert such a character to numeric. If I do as.numeric() , it returns me 1 . I want you to return me exactly 001, is it possible? Tha...
asked by 11.06.2014 / 17:16
1
answer

Histogram with a text column [pending]

I need to make a histogram. I have the following 3 columns: L courses offered M offered vacancies N filled vacancies Jobs offered and filled in ok, the problem is that I can not put the data in column L on the X axis. I got to u...
asked by 18.12.2018 / 10:09
1
answer

Insert more than one row in a chart in R

Good morning, I'm trying to insert three horizontal lines in my chart, but when I use the abline function, it inserts only one. Also, I'm having trouble inserting the vertical line, since my x-axis is in date format, and I'm not able to set t...
asked by 10.07.2018 / 15:02
2
answers

How to change the value of a variable?

I would like to know how to change the value of a variable. I have a numeric variable and would like to change it to a character.     
asked by 28.05.2018 / 21:15
1
answer

Factorial double in r with letters for differentiation

I'm trying to do a double factorial or two-way anova analysis.  I would like to know how to generate the differentiation letters between treatments for both factors.  This differentiation is common in scientific articles in which it is often pre...
asked by 05.04.2018 / 05:42
2
answers

Replace specific column values by NA

I would like to detect and replace values above 6 in just a few columns of a data.frame by NA. I did the syntax like this but it is giving error ... Could anyone give me a help? Thanks! data <- apply(dados[14:128], 2, function(x) {x[x >...
asked by 05.06.2018 / 22:56
1
answer

How to increase the number of iterations of a function in R?

My problem is this, when I perform regression >mod<-glm(y~a+b+c,family=gaussian(link="log"), data = matrix) Warning message: glm.fit: algoritmo não convergiu > summary(mod1) ... Number of Fisher Scoring iterations: 25 To circumvent...
asked by 05.06.2018 / 02:27
2
answers

Does not create the legend on the ggplot2 chart

Hello, I'm here to expose a very basic problem that's occurring, I'm not able to plot the legend next to the graph. I will not say much, just go for my code and the graphic print for you to analyze. library(lubridate) library(gtable) library(g...
asked by 27.02.2018 / 16:03
1
answer

Restrict an R code to a certain local machine

Does anyone know if it is possible to restrict the execution of a certain code created in R to a certain local machine? If so, what would be the code?     
asked by 13.06.2018 / 23:39
2
answers

Search strings in the R language

I need to search in a df column where the text may not be accurate. Example: df$titulo=="SE" & df$titulo=="projeto de pesquisa" does not find anything. I've already tried using like instead of = , already tried to use...
asked by 05.11.2017 / 02:34