Displaying 20 results from an estimated 12000 matches similar to: "Adding a numeric to all values in the dataframe"
2006 Apr 04
2
Selecting out certain values from a MATRIX
I have two objects, one matrix and one vector.
I want to use my vector to subset certain values out of my matrix.
For example:
I want to tell R, to select out all rows in myMatrix into a new myMatrix2 IF
that corresponding row is less than a 0.5 in myVector.
So:
myMatrix = a matrix of 8000 by 20
myVector = vector of 8000
myMatrix2 = a matrix of < 8000 by 20 (based on selection criteria in
2005 Feb 21
3
Sorting a matrix on two columns
Hello,
If a matrix with 5 columns has been defined and the first two columns
need to be sorted in ascending order, how can this be achieved whilst
ensuring the
other 3 columns data are in relative position to the sorted columns?
Glen Jones
[[alternative HTML version deleted]]
2009 Dec 03
2
Dataframe help
Hi there
I have two dataframes
Dataframe_1
column_1 colum_2
121 12345
145 1675
167 2765
Dataframe_2
column_1 column2
121 abc
345 lmn
167 efg
I want a resulting dataframe
121 12345 abc
167 2765 efg
how do i go abt it
Ramya
--
View this message in context: http://n4.nabble.com/Dataframe-help-tp947934p947934.html
Sent from the R
2008 Sep 17
3
selecting dataframe values that are not nulls
Hi,
I have a dataframe with 14319rows and 9 colums. for some rows there are null
values.I want a dataframe without these null values.I wanna select only
those that have values !=NA.
kindly let me know how to do that.
Ramya
--
View this message in context: http://www.nabble.com/selecting-dataframe-values-that-are-not-nulls-tp19537093p19537093.html
Sent from the R help mailing list archive at
2011 Jan 31
5
Finding a Diff within a Dataframe columns
Hi,
I have a Dataframe.
A B C D
0.1 0.7 0.9 0.8
0.20 0.60 0.80 0.70
0.40 0.80 0.70 0.76
I need a resultant dataframe
(A-B) (C-D)
-0.6 0.1
-0.40 0.1
-0.40 -0.06
Any suggestion would be of a great help
Thanks
Ramya
--
View this message in context: http://r.789695.n4.nabble.com/Finding-a-Diff-within-a-Dataframe-columns-tp3247943p3247943.html
Sent from
2008 Nov 25
2
dataframe
hi there
I have a dataframe
abc 123 345
abc 345 456
lmn 567 345
hkl 568 535
lmn 096 456
lmn 768 094
i want the uniques of column 1 and there corresponsing column 2 and 3
output
abc 123 345
lmn 567 345
hkl 568 535
cbind(DF1[,1],DF1[which(unique(DF1[,1]),c(2,3)])
but didnt work
kindly let me know how to go abt it
ramya
--
View this message in context:
2008 Nov 05
3
Dataframe help
Hi there,
I have a dataframe length.unique.info
> length.unique.info
abc 12 345
def 16 550
lmn 6 600
I want those names that fall under the condition (length.unique.info[,2][i]
<=5 && length.unique.info[,3][i] >=500)
abcder<-length.unique.info[which(length.unique.info[,2][i] <=5 &&
length.unique.info[,3][i] >= 500),1]
will "&&" look for
2008 Aug 01
2
how to replace NA values in a list
I have a matrix named "spec" (see below), it is a 6x3 matrix, and each element of spec is a list. For example, spec[1,"wavenumber"] is a list, and it contains 1876 numeric numbers and NAs. I want to replace the NAs to zero, but don't know how to change it, the difficulty may be all the elements are of the class list, so it is hard to change.
Thank you for your help!
2011 Feb 24
1
Removing -Inf values from all the colums in a dataframe
Hi there,
b is my dataframe.
I have a dataframe. I am trying to get rid of the -INF values but didnt have
much luck
b[which(is.finite(b))]
I can get rid of it for a single column
b[,1][which(is.finite(b[,2]))] but not for all dataframe I used it inside of
a sapply but still no dice
my guess is it might have some differing row numbers and just ignoring the
columns itself.
Thanks
Ramya
2008 Sep 05
3
comparing two files
Hi there
I have two object on is a vector T and the other is dataframe C.
vector T has more no of rows when comapred with a dataframe Ccolumn[,2].I
want to find the the missing rows in dataframe C.That is those values that
are not matchig in dataframe C[,2]
Kindly give me suggestion on how to go about it.
Ramya
--
View this message in context:
2008 Sep 17
5
inserting values for null
I have a dataframe D.F1
>dim (D.F1)
14351 9
This dataframe has values and for some 1000 rows it holds NULL values.I hace
found the missing values for about 500 and have those in another dataframe
D.F.sub.2
>dim(D.F.sub.2)
500 9
as dataframe is a subset of D.F1 the coulmn 1 in D.F.sub.2 is a subset of
D.F1.I have to insert the values in D.F1 in other fields while the coulmn 1
in both
2008 Oct 09
3
LIST HELP
Hi,
I have a list(A1) of dataframe and a vector containing a 22 list names.
list(A1)
abc
l m n
p q r
dce
e g h
l k m
kpo
a d c
also i have a vector of list names.
abc,dce similarly i have 22 elements.
I wanna delete or want a list without the list elements whoes name match up
the vector.
my result should be
kpo
a d c.
i tried lapply it is in working in the way i want.
Kindly help me
2008 Nov 05
3
Sort help
Geneset_name #Chromosome #Hit_in_Biomart
original_geneset_len Missing.genes
[1,] "AGUIRRE_PANCREAS_CHR12" "1" "51"
"59" "8"
[3,] "AGUIRRE_PANCREAS_CHR9" "1" "24"
"24"
2011 Jun 21
5
converting character to numeric
I'm trying to convert data from character to numeric.
I've imported data as a csv file, I'm assuming that the import is a
database - are all the columns in a database considered "vectors" and that
they can be operated on individually
Therefore I've tried the following
mydata <- as.numeric(mydata$apples)
when i then look at mydata again the named column is still
2008 Jul 21
3
vector help
hi
I have vector test. It has 3 elements. I want to join the three into one
vector.
"Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20".
how can i do it.
> class(test)
[1] "character"
> test
[1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157"
[3] "20"
Ramya
--
2009 Dec 07
3
Regular expression help
Hi there
I have a string like this i want to extract 9831019 from this string i used
a regular expresion \d+ by which i can only make it to see 7 and returns.
This type of number(9831019) appears in any part of the string and is
definitely more than 5 digits all the time and i want to give that as a
condition
UV7C11-F9-E1 MCS#9831019
MCS Lot #9512516"
how do i go abt it
Ramya
--
View
2008 Oct 20
2
convert matrix to dataframe with repeating row names
Hi R,
I have a matrix x with repeating row names.
> dim(x)
[1] 862 19
zz<-matrix(0,4,4)
rownames(zz)=c("a","a","b","b")
data.frame(zz) (?)
I need to use x in a linear regression
lm(as.formula(paste("final_dat[,5]~",paste(colnames(x),collapse="+"))),x
)
this gives me a error
Error in
2008 Jul 11
3
List help
hi,
I need to remove the list that does not have any values.Do suggest me the
way to do it.
result<- list()
> head(result)
[[1]]
[,1] [,2] [,3]
[[2]]
[,1] [,2] [,3]
[[3]]
[,1] [,2] [,3]
[[4]]
[,1] [,2] [,3]
[[5]]
[,1] [,2] [,3]
[1,] "HIGD1C" "SNP_A-2058537" "4"
[2,] "HIGD1C" "SNP_A-1955347"
2008 Jul 28
2
writing the plots
hi there,
I want to write the plots in the pdfs and the details about the graph in a
seperate notepad.
plot(as.numeric(lapply(resultgenes,length)),
main= "Geneset.gene#.bias.test",xlab="Top.Ranked.Genesets",
ylab="gene.number.per.geneset")
lines(loess.smooth(c(1:1000),as.numeric(lapply(resultgenes,length)), span =
2/3, degree = 1,
family =
2009 Nov 24
2
Re moving white space help
Hi there
I am trying to remove the white space and replace it with nothing but didnt
have any luck with that
x <- and fgh-
i can replace the comma using gsub
gsub("\\-","",x)
but i cant replace the white space with nothing.
Ramya
--
View this message in context: http://old.nabble.com/Removing-white-space-help-tp26503431p26503431.html
Sent from the R help mailing list