Questions tagged as 'r'

2
answers

Extract elements from a data frame in R

I have a database with some probabilities, like this: library(tidyverse) tribble( ~FV, ~HC, ~HT, ~JA, ~JN, ~JP, ~JU, ~LA, ~LC, ~LM, ~MG, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0.02, 0, 0, 0, 0, 0, 0, 0, 0.11, 0, 0, 0.04, 0, 0, 0, 0,...
asked by 16.08.2018 / 18:33
2
answers

Fill dataframe in R according to values of the main column and the main row

Sorry for the title but it's hard to explain, I think with an example it's better. Suppose I have a dataframe or another that shows me the amount of money information in different currencies for each person, a table like the one shown below:...
asked by 12.07.2018 / 00:11
1
answer

Do you apply ARIMA model to new data?

I am using the "forecast" package from R to adjust ARIMA models to my data. In the models I use external regressors in the following way: library("forecast") Modelo<-arima(log(Recupera), order=c(12,1,1), xreg = Colocacion, include.mean=FALS...
asked by 08.05.2018 / 01:33
1
answer

Read a CSV in R, from another one generated by R

I explain my current situation, I want to be able to save a CSV file in one operating system and load it in the other without having to indicate the type of column. I explain why. When you have in R a data.frame style: data.frame(V1=c("1","2...
asked by 03.09.2018 / 17:11
1
answer

Extract a text string from an HTML in R

I am working in R Studio and I have an html, I have managed to create a table with the content I need, but it turns out that the program that creates the .htm file is Metatrader 4 and the variables are added as the title of the row as you can se...
asked by 08.04.2018 / 17:46
2
answers

About R and his GPL-3 license

Being R distributed under license GPL-3 , Should not all packages and other Scripts be distributed under the same license? I ask, because I have seen that many packages are distributed under other licenses as MIT.     
asked by 04.06.2017 / 17:39
0
answers

Predict "lpmatrix" of an average model calculated with MumIn (model averaged)

I'm trying to use the predict function with type lpmatrix with an object type averaging and I have two doubts, the script would be as follows: full_gam <- gam (abundance ~ s(chla, k = 4) + s(g_chla, k = 4) + s...
asked by 16.03.2017 / 17:42
2
answers

Create a for to consult values of a data

I have a data with several variables and I want to use a for to scroll through several variables and check the values. The data table data contains the variables V1, V2 ... V15. What I want is to create a Stotal variable that is the sum of th...
asked by 07.12.2017 / 13:15
1
answer

How to format a string without escape characters

I'm using R (RStudio) to make a graphic using Shiny and rCharts, the highcharts library. I want to make a bar chart and put an image in the labels of the X axis instead of a string. What I want in the final code of the graphic is, in the H...
asked by 24.10.2016 / 17:07
1
answer

subset data in a loop for R

I'm doing a script in R where a for loop iterates over a vector string called iter. The following code works and generates a variable named as the value that iter takes at that moment (i) that contains the filtering of a dataframe according to i...
asked by 10.02.2017 / 09:55