Questions tagged as 'r'

0
answers

Denormalize data in R

I have the following code testset1 <- datos4[1,] prueba <- neuralnet::compute(net, testset1[,1:10]) prueba$net.result predicted=prueba$net.result * abs(diff(range(datos4[,11]))) + min(datos4[,11]) print(predicted) The result g...
asked by 28.11.2018 / 05:33
1
answer

Event probability chain

I have 14 events (A: N) and I want to calculate the probability that there is a transition from A to B , or > B to C , A to C , from A to A , etc ... in a vector like this:    x < - c ("J", "J", "K", "K", "K", "M", "J", "J",...
asked by 25.09.2018 / 19:27
1
answer

Extract text from a string in R

I have a base from which I must extract part of the text, the name of the company. Here's an example: 995 945 Disprofa 741 593 63 56 302 292 351 Servicios 996 0 Terminal Puerto garin 740 Terminal 997 783 Las Las 740 871 -73 -51 142 203...
asked by 06.09.2018 / 16:13
0
answers

Heatmap with different levels on the axis with GGPLOT

I have some data arranged as follows: And I'm trying to generate a heatmap (extend something I've already done with geom_raster() ) to get something like that, with two levels in one of the axes: I found an answer for the ca...
asked by 04.09.2018 / 14:18
0
answers

how to use nlsM minpack R

I have this information: A xo x y yo p_1 p_2 p_3 p_4 s1 s2 s3 s4 1 1.7 1.7 0.45 0.45 1 0 0 0 0.45 #N/A #N/A #N/A 1 1.7 2.7 2.49 0.45 1 0 0 0 0.45 #N/A #N/A #N/A 2 1.7 1.7 0.48 0.48...
asked by 13.07.2018 / 13:12
1
answer

MARQUARDT in Non-linear Regression in R

was trying to adjust the following equation (G~G0*exp(-(b12)*t^-(b13))/exp(-(b12)*t0^-(b13)) by non-linear regression in R, from the following SAS script: proc model data=five method=MARQUARDT maxiter=1000 My doubt arises in how to a...
asked by 09.07.2018 / 10:49
0
answers

Confidence intervals of a mixed linear model (lme) in R

From a mixed linear model (lme), I am interested in obtaining the confidence intervals (CI) of all levels of the fixed factors. With the function intervals() I get the interval of the intercept, as a referent, and only of some levels, but...
asked by 12.04.2018 / 02:14
2
answers

Swapping subvectors given a vector using R

I have a vector column of ¨n¨ components as in the following example: c(1,3,8,10,23,78,5,15,47,1,8,51) How can I obtain a vector with R in which a permutation is applied for every six elements? For example, a possible first permut...
asked by 14.03.2018 / 19:02
1
answer

message warning NaNs in gammamixEM ()

I am using the function gammamixEM () of mixtools in R, and at the end of the calculation I get the parameters but this warning appears. x <- c(34.290, 34.798, 34.798, 185.420, 28.448, 29.718, 32.766, 21.844, 36.576) g <-gammamixEM(x) g...
asked by 20.03.2018 / 22:25
0
answers

Sort boxplot by mean in R - error [closed]

I am trying to sort my data in a boxplot graph in R, by the average, but in the last step I get an error. Below I copy the script and the error. Thanks: >Tempranillo <- read.table("/Users/davidgramaje/Desktop/Tempranillo_def.csv", header...
asked by 08.03.2018 / 17:58