Displaying 5 results from an estimated 5 matches for "franciscororolaio".
2012 Jan 24
5
drop columns whose rows are all 0
Hello,
I have a dataset with 40 variables, some of them are always 0 (each
row). I would like to make a subset containing only the columns which
values are not all 0, but I don't know how to do it.
I tried:
for(cut_column in 1:40) {
if(sum(dataset[,cut_column])!=0) {
columns_useful<-c(columns_useful,dataset[cut_column])
}
}
sorted_dataset<-subset(dataset,
2012 Jan 15
1
Word Wrap
Hello,
I have to write a big sentence with cat() and I would like that R
automatically adds a new line when it is needed (when the text arrives
at the end of the window), the same as Windows Notepad does (Word Wrap).
How could I do?
Thank you
F.
2012 Jan 13
2
read.table as integer
Hello,
I have a csv file with many variables, both characters and integers.
I would like to load it on R and do some operations on integer
variables, the problem is that R loads the entire dataset considering
all variables as characters, instead I would like that R makes the
distinction between the two types, because there are too many variables
to do:
x1<-as.integer(x1)
2012 Jan 18
0
quantile type 1 perhaps?
Hello,
I need to analyse some data coming from a questionnaire which have for
each item a likert scale 1-5. I need to find the lowest scores in the
distribution, and for this purpose I thought to use the quantile()
function to identify the participants belonging to the 5% with lowest
scores (who have a score < than quantile, am I right?).
The problem is: which type of quantile should I
2012 Feb 09
1
subset select="variable with a list of names"
Hello,
I would like to make a function which extracts a subset, from a dataset,
with only the columns that I want (specifying their names).
For example, having this matrix:
> mydata<-matrix(c(22,1,3,2001,24,5,7,2002,26,7,8,2002,28,5,7,2003),
byrow=TRUE, ncol=4, dimnames=list(c(1,2,3,4),
c("age","day","month","year")))
> mydata
age day