# r programming help

1. ### help where is the error

I have the following code not written by me new_tum <- as.matrix(clinical[,ind_keep]) new_tum_collapsed <- c() for (i in 1:dim(new_tum)[1]){ ifsumis.na(new_tum[i,])) < dim(new_tum)[2]){ m <- min(new_tum[i,],na.rm=T) new_tum_collapsed <- c(new_tum_collapsed,m) } else {...
2. ### Efficient R coding

Consider the following data frame: dat <- data.frame(x=c(0,128.96,0,397.37,56.80,0,801.79,340.79), y=c(40,97,172,186,210,246,327,432), d=c(1,0,0,0,0,1,0,1), A=c(0,1,0,1,1,0,1,1), B=c(0,1,0,1,1,0,1,1)) For each value of the column y which satisfies...
3. ### Basic questions from newbie

Hi, I am currently learning ML algorithms and implementing in R. I have a couple basic questions. 1.)Is dimensionality reduction same as feature selection? I know that in R specifying importance=T parameter in randomForest function gives you the important features based on info.gain.I was...
4. ### Differential item functioning for IRT using R programme

Hello, I will analyze polytomous differential item functioning for IRT. I have a Likert type scale. For example, I want to analyze items in term of gender. lordif is sufficient for this or are there any other packages in R programme? Best Regards,
5. ### Tutor needed for R programming help PAID tutor opportunity

Hi my name is Sam. I am looking for a statistics tutor who is familiar with the R programming language. I have some questions that I need help with and they are in the R programming software. I can compensate you for your time. I can scan and email you the questions I need help with. I will...
6. ### fuzzy clustering

I am very new R and statistics.. I have dataset that contain 4 columns of data incident | Lat | Long | ClosedDate > Construction Noise | 1.324 | 1.44 | 29/03/2011> Smell | 1.324 | 1.525 | 29/02/2009> Accident |...
7. ### error message meaning ??

I have the following code to calculate the SPI drought index mat <- matrix(c(2.26, 1.54, 2, 1.61, 2.75, 5.26, 4.78, 2.76, 0.829, 2.35, 3.4, 3, 8.28, 7.76, 2.14, 2.22, 0.939, 2.73, 2.18, 6.38, 6.66, 1.83, 2.41, 1.93, 2.83, 5.71, 4.4, 4.34, 2.28, 3.62, 1.35, 3.79, 2.58, 2.62, 5.02, 2.07, 1.95...
8. ### chi-squared hypothesis test of homogeneity using R

A survey of drivers was taken to see if they had been in an accident during the previous year, and if so was it a minor or major accident. The results are tabulated by age group: \begin{array}{c|lcr} \text{Age} & \text{None} & \text{Minor} & \text{Major} \\ \hline \text{under} 18 &67 &...
9. ### I get the following error message , what shall I do?

I have the following code: mat <- matrix(c(99.26252,71.37107,61.3334,39.18475,24.28588,14.35852,6.303219, 3.56242,1.954307,130.77527,94.88575,78.30003,49.84874,31.19563, 18.62511,8.588128,4.634585,2.460038,151.68859,110.49118...
10. ### counting weeks in R

I have the following data "2001-01-01" "2001-01-02" "2001-01-03" "2001-01-04" "2001-01-05" "2001-01-06" "2001-01-07" "2001-01-08" "2001-01-09" "2001-01-10" "2001-01-11" "2001-01-12" "2001-01-13" "2001-01-14" "2001-01-15" "2001-01-16" "2001-01-17" "2001-01-18" "2001-01-19" "2001-01-20"...
11. ### R Program

I have a precipitation data"daily" and I formed the following index DRI from the data \begin{tabular}{|l|cr|} \hline Daily Rainfall(mm) & DRI \\ \hline 0-4.9 & 0 \\ 5-9.9 & 1 \\ 10-14.9 & 2 \\ so the general formula is 5n-5n+4.9 & n\\ \hline \end{tabular} I have the following code...
12. ### Applying prepared script for one file to many files in a directory?

I am having a problem with the main loop.it succeeded to finish reading and writing from the first file in my listfile(12 files) but failed when it moves to the second file giving this error:Error: subscript out of bounds.I think my problem is with K but I dont know how to solve it.Any help...
13. ### help for task in R programming language

This is my task. I don't know how to solve it in R studio. Please help me!!! Simulate: a) 15 values from N(0,1) distribution b) 50 values from N(1,5) distribution c) 30 values from exp distribution with parametar 2 For all these I hade to find mean, standard deviation, deviation. And...
14. ### parent object programming question

Hi everyone, I was wondering if someone knows a way to accomplish this task in R. I'm overriding the operators(+,-,*,/) in my own class which is similar to a data.frame. When you do something like this: mc[3] <- mc[1] + mc[2] I'd like the parent object mc to save the expression on the...