similar to: how can I convert .csv format to matrix???

Displaying 20 results from an estimated 10000 matches similar to: "how can I convert .csv format to matrix???"

2010 Apr 14
8
how can I plot the histogram like this using R?
I want to get the plot like this, http://n4.nabble.com/file/n1839303/%25E9%25A2%2591%25E7%258E%2587%25E5%2588%2586%25E5%25B8%2583%25E5%259B%25BE%25E6%25A0%2587%25E5%2587%2586.jpg %E9%A2%91%E7%8E%87%E5%88%86%E5%B8%83%E5%9B%BE%E6%A0%87%E5%87%86.jpg not this, http://n4.nabble.com/file/n1839303/R.jpg R.jpg and the data here, thank you! http://n4.nabble.com/file/n1839303/y1.txt y1.txt can R
2009 Dec 21
5
Help,Suggest me some methods to identify training set and test set!!!
I want to split my whole dateset to training set and test set, building model in training set, and validate model using test set. Now, How can I split my dataset to them reasonally. Please give me a hand, It is better to give me some R code. and I see some ways like using SOM to project whole independents to 2-dimensions and find some to be training set and others are test set. like below. I
2010 Dec 26
4
how to replace my double for loop which is little efficient!
Dear all, My double for loop as follows, but it is little efficient, I hope all friends can give me a "vectorized" program to replace my code. thanks x: is a matrix 202*263, that is 202 samples, and 263 independent variables num.compd<-nrow(x); # number of compounds diss.all<-0 for( i in 1:num.compd) for (j in 1:num.compd) if (i!=j) { S1<-sum(x[i,]*x[j,])
2009 Nov 04
1
variable selectin---reduce the numbers of initial variable
hello, my problem is like this: now after processing the varibles, the remaining 160 varibles(independent) and a dependent y. when I used PLS method, with 10 components, the good r2 can be obtained. but I donot know how can I express my equation with the less varibles and the y. It is better to use less indepent varibles. that is how can I select my indepent varibles. Maybe GA is good
2010 Jan 02
1
Please help me!!!! Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected
I am learning the package "caret", after I do the "rfe" function, I get the error ,as follows: Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected In addition: Warning message: In predict.lm(object, x) : prediction from a rank-deficient fit may be misleading I try to that manual example, that is good, my data is wrong. I do not know what
2009 Nov 07
1
after PCA, the pc values are so large, wrong?
rm(list=ls()) yx.df<-read.csv("c:/MK-2-72.csv",sep=',',header=T,dec='.') dim(yx.df) #get X matrix y<-yx.df[,1] x<-yx.df[,2:643] #conver to matrix mat<-as.matrix(x) #get row number rownum<-nrow(mat) #remove the constant parameters mat1<-mat[,apply(mat,2,function(.col)!(all(.col[1]==.col[2:rownum])))] dim(yx.df) dim(mat1) #remove columns with numbers of
2011 Jun 21
5
omitting columns from a data frame
Dear R People: I have a data frame, xm1, which has 12 rows and 4 columns. If I put is xm1[,-4], I get all rows, and columns 1 - 3, which is as it should be. Now, is there a way to use the names of the columns to omit them, please? Thanks so much in advance! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown
2008 Feb 15
4
Pin CPU of dom0
Hello, I searched the mail list, but can''t find a solution. I have a machine with 8 cores. I want to set the CPU affinity for dom0. For example, let Dom0 use processor 0-3, let guests use 4-7 For guest domains, I can do this by setting the "cpus" For dom0. there''s no such option. The only one I know is in /etc/xen- config.sxp, which has "dom0-cpus" setting.
2002 Apr 02
1
predict with arima0
Dear R People: I'm trying to use the predict command on an arima0 object. I do the following: xm.arma <- arima0(xm2,order=c(1,0,1)) predict(xm.arma,n.ahead=2) and I get the message: Error in round(x, digits) : Non-numeric argument to mathematical function Any ideas what the problem might be, please? R version 1 4 1 on Windows. Thanks in advance! Sincerely, Erin Hodgess Associate
2011 Feb 17
2
convert the sas file into csv in R
i am trying to convert sas file into csv. I used write.csv(a, file="cool.csv") but nothing come out. i don't know why. Thanks. library(Hmisc) a<- sasxport.get("C:\\Users\.....") write.csv(a, file="cool.csv") -- View this message in context: http://r.789695.n4.nabble.com/convert-the-sas-file-into-csv-in-R-tp3311769p3311769.html Sent from the R help mailing
2017 Aug 17
3
How to convert .Rdata file into .csv or something else?
Dear mailing list members, I am a beginner of this community. I would like to analyze data in a .rdata file. I ran the following code, but the object "d" remained empty. d <- load("~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.rdata") I would like to know how to convert this file format into .csv or .txt. I suppose this question is very basic, but I could not find solutions
2017 Aug 17
0
How to convert .Rdata file into .csv or something else?
Welcome to the forum .Rdata may contain many different objects. I would suggest doing a? "ls()" to see what objects you have. then have a look at ?write.table or ?write.csvThese commands will write many types of objects to a .csv file. For example if I have a data.frame called "dat1" I can write it to a csv (text) file like this: write.csv(dat1, "~/Rjunk/mydata.csv")
2003 May 16
1
Newbie Matrix problem refined; Can't convert .csv data to matrix
Thanks to all for your previous help. I see now that my problem is converting my .csv file of data into a matrix. My example is a (3x3) matrix with a "header" row (that doesn't contain numerics). Thanks again for your time and gracious consideration.
2005 Apr 19
1
type.convert error with read.csv function
Dear all, I obtained and successfully compiled R 2.1.0 on Mac OSX 10.3.9. The flags used for configuration are: ./configure --enable-utf8 --enable-R-shlib --with-blas='-framework vecLib' --with-lapack --with-aqua --with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh --with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh TCLTK_LIBS='-framework Tcl -framework
2009 Nov 06
2
how can I delete those columes with the same element in every row?
e.g. a= a b c d e 1 1 1 3 1 1 2 1 2 3 4 5 3 1 3 3 8 3 4 1 4 3 3 5 5 1 1 3 1 1 I want to delete colume a and colume c, because they have the same values in every row, then ,I want to get this data.frame . b= b d e 1 1 1 1 2 2 4 5 3 3 8 3 4 4 3 5 5 1 1 1 the following is my code but it's wrong. rm(list=ls()) a=c(1,1,1,1,1); b=c(1,2,3,4,1); c=c(3,3,3,3,3);
2009 Nov 06
2
another question: how to delete one of columes in two ones with high correlation(0.95)
my programe is below: a=c(1,2,1,1,1); b=c(1,2,3,4,1); c=c(3,4,3,3,3); d=c(1,2,3,5,1); e=c(1,5,3,5,1) data.f=data.frame(a,b,c,d,e) origin.data<-data.f cor.matrix<-cor(origin.data) origin.cor<-cor.matrix m<-0 for(i in 1:(cor.matrix[1]-1)) { for(j in (i+1):(cor.matrix[2])) { if (cor.matrix[i,j]>=0.95) { data.f<-data.f[,-i]; i<-i+1 }
2001 May 23
1
Passing a string variable to Surv
Hi, I am trying to write a function to automate multiple graph generation. My data looks like: Table of numeric values with the following headers: timeM1 statusM1 xM1 timeM2 statusM2 xM2 timeM3 statusM3 xM3 1 2 3 4 5 6 Where M1,M2, M3 hve no similarity except they have a max string length of 7. Examples are mcw0045, adl0003, lei0101. Now, what I want to do is Function(M1, M2,
2014 Apr 26
2
Please make Pre-3.1 read.csv (type.convert) behavior available
Hi, We at 0xdata use Java and R together, and the new behavior for read.csv has made R unable to read the output of Java?s Double.toString(). This, needless to say, is disruptive for us. (Actually, it was downright shocking.) +1 for restoring old behavior. Thanks, Tom
2003 Jul 09
2
packaged datasets in .csv format
A couple of questions in connection with using .csv format to include data in a package: First, the background. The data() function loads data from .csv ("comma-separated values") files using read.table(..., header = TRUE, sep = ";") But ?read.table says ## To write a CSV file for input to Excel one might use write.table(x, file = "foo.csv", sep
2010 Nov 01
2
write.csv changes the format of the date
Dear Group, Why does write.csv modify the date format when it write to a file. I have the following variable Param_Dat: dput(Param_Dat) structure(list(Last_Successful_Run = structure(1L, .Label = "30/10/2010", class = "factor")), .Names = "Last_Successful_Run", class = "data.frame", row.names = c(NA, -1L)) When I do: