Questions tagged as 'r'

1
answer

Data conversion factor for numeric

In the following example: > str(rhm) 'data.frame': 24 obs. of 4 variables: $ plant : Factor w/ 1 level "LaR": 1 1 1 1 1 1 1 1 1 1 ... $ time : int 0 0 0 0 3 3 3 3 7 7 ... $ Tratamento: Factor w/ 4 levels "T1pH1","T1pH2",..:...
asked by 19.07.2016 / 20:23
1
answer

Create package in Windows

Given a set of functions, how to create a package in Windows OS? For example for the two functions below: soma = function(x, y){ res = x + y res } multiplica = function(x,y){ res = x*y res }     
asked by 03.06.2016 / 01:15
2
answers

Vector gradient for use in the optimum function

I have already looked a lot in various forums and many pages on parameter estimation via the optim function of R and found nothing on how to add the gradient function in a script, so that the derivatives are calculated via some function o...
asked by 30.10.2016 / 18:28
1
answer

Read file with non-ascii format [à="U + 00E0"]

I'm reading a file in R called roubobs.rds . is a proprietary R format and I could not open it in excel. I can import the data into a variable but, within the records, the texts are with non-ascii (unicode? Utf-8?) Codes. I've browsed to t...
asked by 03.01.2017 / 19:55
1
answer

Save changes to an app loaded in shinyapps.io

I'm developing an application on Shiny that I'll upload to shinyapps.io . It consists of an already loaded table that the user can select some line, and then a report is generated based on the selected line. In addition, the user c...
asked by 10.01.2017 / 20:44
1
answer

Change output in shiny only when I change the value in numericInput ()

I have this table in my shiny application. | a | 2 | | b | 3 | | c | 5 | It has a box to choose a line (from 1 to 3), and from there it starts the value referring to that line. It also has another box so I can change that value. But the...
asked by 09.01.2017 / 18:28
1
answer

Histogram R. Changing the values of the axes!

I have a variable with the following value: > pontos c d b a 0.6666667 1.0000000 0.3333333 0.6666667 hist (points, main="Points", xlab="p", ylab="f") The result is: Myx-axisvalueswillalwaysbebetwee...
asked by 21.12.2016 / 02:24
2
answers

Bat file to run file.r

I would like to use a .bat file to run a particular .r file daily with the windows taskmanager, but I can not get it to run. My steps: 1) open notepad 2) enter code, which is currently: "C:\Program Files\R\R-3.3.0\bin\i386\Rscript.exe" -...
asked by 10.04.2017 / 21:07
2
answers

ggplot data.frame

I have a data.frame (df): Mês SpreadMensal 1 jan2006 -3.04045769 2 fev2006 -3.39026284 3 mar2006 -2.52839603 4 abr2006 -1.52792341 5 mai2006 -0.08979180 6 jun2006 1.02865488 7 jul2006 0.54515613 8 ago2006 0.1...
asked by 13.10.2015 / 16:13
1
answer

Why does the for-loop convert from Date to integer?

Does anyone know how to explain why for-loop objects are Date converted to integer ? In the code below I want to iterate in dates but these are converted to integers. > dates <- Sys.Date() + 1:10 > dates [1] "2015...
asked by 29.09.2015 / 03:25