I have a time series basis. In the base it has information of consumption of ration of pigs (it follows below with information of only one day and one animal). There is a column with the identification of the animal, day and time of day that the...
I have the following database:
id x
1 2
1 3
2 3
3 3
3 3
3 3
I wanted to create a new database without repeating the value of the field id , to solve this I can average the values of field x tha...
I'm trying to create a chart with the following code:
ggplot(data=percent.prod, aes(x=Ano,
weights=Percent)) +
geom_bar(aes(fill=Tec), color="Black") +
geom_text(aes(x=Ano, y=Percent, group=Tec, label=Percent),...
I have a database with the second structure:
a=as.data.frame(tribble(
~a, ~texto, ~x2007, ~x2008,
"a","aa",0,0,
0,"--",12,13,
"b","bb",1,2,
"c","cc", 0, 0,
0,"dd", 0,0,
0,"ee",7,8))
Lines beginning with zero are...
I am programming a simple recursive algorithm to calculate the Fibonacci sequence in R, just as I do in C. It follows the same thing below:
fibonacci <- function (n)
{
if (n == 1L)
return (0L)
else if (n == 2L || n == 3L)
return...
I try to convert my list (which contains 12 dataframes and approximately 20,000 lines each) into separate dataframes:
list2env(mylist,envir=.GlobalEnv)
but the following error message appears:
names(x) must be a character vector of the sa...
Hello,
I made the program that is used to do basic text preprocessing for use in text mining tools. It should be something trivial, but I can not see where it might be wrong.
#####################################################
##
## Exemp...
I'm trying to turn every variable in my database into dummy variables:
>dados
X1 X2 X3
1 1 3 1
2 3 2 1
3 3 2 1
4 2 3 2
5 2 3 3
I'm trying to create binary vectors for this. But, I can not do it right.
Since I have 3 cate...
I made a linear regression lm() , where I declared some variables as factor , and got some betas as NA as:
citySão José
NA
When I made the prediction, the prediction occurred and I received the following warning:
Warnin...
I am trying to import a column of decimals into csv (part of a dataset) through the function read_delim . However, the columns with decimal numbers (separated by commas in the original dataset) are coming as integers.
Ex:
175,60 app...