Questions tagged as 'r'

1
answer

Changing the missing data NA by "something else"

When I import a .sav file I do not want the < NA > in my mydata1 . I would like instead of NA to appear, for example, "something else." mydata = read.spss('mydata.sav', use.value.labels = TRUE, to.data.frame = TRUE,...
asked by 15.05.2014 / 23:24
3
answers

How to merge multiple frames into one

I want to create a data frame as a join of 4 other data frames. I was able to do this using these commands: ZHO<-as.data.frame.matrix(zho) ZHO ZES<-as.data.frame.matrix(zes) ZES ZRE<-as.data.frame.matrix(zre) ZRE POP<-as.data.frame...
asked by 28.05.2014 / 02:18
1
answer

How to count the cumulative number of occurrences of an element in a vector?

Suppose I have a vector in R: x <- c("a", "a", "b", "a", "b", "c") I need to determine, for each position i of the vector, how many times the x[i] element has appeared so far. The result for the above vector would be [1]...
asked by 14.12.2013 / 09:51
1
answer

Error in plot.window (...): need finite 'ylim' values

I have a continuous variable whose n=15000 remarks and displays 451 NA's. When running qqnorm to evaluate the normality, I verified that it does not present normality and so I applied a logarithmic transformation. However, when run...
asked by 07.09.2017 / 14:06
1
answer

Spatial analysis in R: how to implement a polygon with splancs?

I'm trying to calculate the intensity of a spot pattern with "kernel smooth" (sorry, I do not know how to translate this). Before running smooth kernel code, you must specify a histogram bandwidth for your data. Several different widths are poss...
asked by 05.04.2015 / 16:25
1
answer

Import LateX for R Markdown

Hello! Probably this question was already covered here but I did not find it ... Well I use Markdonw R to generate manuals on certain R commands, but I did a diagram in LateX and wanted to know if there is any way to import the same for R Markdo...
asked by 27.04.2015 / 07:24
2
answers

Updating Mysql table using sqlSave in R

I'm new to R and I'm trying to add new tables in the database, the problem is that it always shows this message: Error in sqlSave(connection, dado, tablename = "teste", rownames = FALSE, : unable to append to table ‘teste’ Where: dado =...
asked by 17.04.2015 / 14:54
1
answer

How to apply filters in a data.frame?

I have a database in Excel with 12135 data and not all fields are filled and some individuals are of negative age and others are older than 17 years and others older than 70. I need to know what SOFTWARE functions / filters to solve these two...
asked by 21.04.2016 / 17:39
1
answer

How to transform imported Excel data (.csv) into time series

Imported an Excel database for R and need to transform them into time series so that you can analyze them. However, when I make the transformation to time series, the R changes the original values to totally different ones. Here are the steps I...
asked by 05.07.2015 / 14:55
1
answer

Create new database from random values with loop or other method

I have three dataframes with different number of rows and I would like to create a new dataframe with 100 random values from these dataframes and based on three criteria: A - Column a and b will have 100 random values from the 1 dataframe...
asked by 10.04.2017 / 17:41