Displaying 20 results from an estimated 10000 matches similar to: "[Rd] Scan data from a .txt file"
2005 Nov 17
1
Scan data from a .txt file
Hi all,
Am trying to read data from a .txt file in such a way that i can access the
column names too. For example, the data in the table.txt file is as below:
Name Weight Height Gender
Anne 150 65 F
Rob 160 68 M
George 180 65 M
Greg 205 69 M
i used the following commands:
data<-scan("table.txt",list("",0,0,0),sep="")
a<-data[[1]]
b<-data[[2]]
2005 Dec 01
1
Transfer String Array from R to java
I have a data frame which has the following data.
data<-read.table("table.txt",header=TRUE)
data
X14A_U133A_StatPairs X14A_U133A_Detection X14B_U133A_Signal
1 AFFX-BioB-5_at 403.0 409.3
2 AFFX-BioB-M_at 757.3 574.4
3 AFFX-BioB-3_at 284.4 327.3
4 AFFX-BioC-5_at
2006 Feb 22
4
heatmap.2 in gplots package
Hello all,
I am using the heatmap.2 function in the gplots package. I want to supress the reordering of the columns of the data matrix i pass to the function. I used the statement,
heatmap.2(z,Colv=FALSE,dendrogram="row",col=redgreen(75))
where z, is the matrix of data. The output i want should have the rows reordered along with the dendrogram and the columns should be in the original
2005 Nov 18
2
Image display in R
Hi all,
I am trying to display a matrix of plots(images), for example a 3*3 matrix
of 9 image plots, such that when a user clicks on a image i can show the
enlarged plot. I tried the multiple graphic device(using mfcol=c(3,3) and
mfg), but it creates multiple plots in a single image file. So, i won't be
able to highlight a particular plot when the user clicks on it.
To be more clear, can i
2005 Nov 18
2
Image display in R
Hi all,
I am trying to display a matrix of plots(images), for example a 3*3 matrix
of 9 image plots, such that when a user clicks on a image i can show the
enlarged plot. I tried the multiple graphic device(using mfcol=c(3,3) and
mfg), but it creates multiple plots in a single image file. So, i won't be
able to highlight a particular plot when the user clicks on it.
To be more clear, can i
2005 Dec 01
1
Row wise function call.
I have another issue.i have a function which calculates the log2(col i
/col2) value, where i stands for columns 3,4,...etc.
data<-read.table("table.txt", header=TRUE)
iratio<-function(x){
for(n in 3:ncol(data)){
z<-log2(data[x,n]/data[x,2])
}
}
Where x- the row number of the data frame(data).
i want to store the ratios for each row in a object z, which can be
accessed
2005 Oct 17
1
Display a plot in an applet.
Hello,
I am trying to display a plot produced in R as part of an Applet. Stating
more clearly, i want to display a scatter plot(X axis data:1,2,4,5 and
Y-axis data:4,6,5, 7)produced in R as an Applet. How can this be done?
Please let me know.
Thanks,
Vasu.
[[alternative HTML version deleted]]
2005 Nov 25
1
read.table without sep
Hello all,
I have a data file table.txt which i have attached. I am trying to pass the
columns as arguments to a function "totnorm" where i am displaying a total
normalization plot. The function is given below:
totnorm<-function(x,y){scale<-sum(x)/sum(y);xlab<-colnames(x);ylab<-colnames(y);x1<-x[[1]];y1<-scale*y[[1]];plot(x1,y1,xlab=xlab,ylab=ylab,col=6,
col.lab=4);}
2005 Nov 25
1
read.table without sep
Hello all,
I have a data file table.txt which i have attached. I am trying to pass the
columns as arguments to a function "totnorm" where i am displaying a total
normalization plot. The function is given below:
totnorm<-function(x,y){scale<-sum(x)/sum(y);xlab<-colnames(x);ylab<-colnames(y);x1<-x[[1]];y1<-scale*y[[1]];plot(x1,y1,xlab=xlab,ylab=ylab,col=6,
col.lab=4);}
2005 Oct 05
2
R and Java
I am a grad student and am working on a project where i need to integrate
java and R. I have a front end in java and i need to call R functions and be
able to dispaly the plots and graphs produced by R on my java front end. I
came across some tools like SJava and rserve...but am not sure which best
suits my application. Your suggestion will be really helpful.
Thanks,
vasu.
[[alternative HTML
2007 Jun 29
1
How to add elements to a table
Hi,
I've been using R for a few weeks now, but consider myself still a
newbie, especially in what concerns the basics of data handling in R.
My situation is this:
I read in data from a database using RODBC, and then use "table" to
produce a table of "counts per years", table which I give to "plot".
All is well, as long as there are no gaps in the years
2009 Aug 24
1
Copy & Paste from tktext on Mac
Hi there,
a text Window is supposed to map the shortcuts for copying and pasting
(<Ctrl-C>, <Ctrl-V>) automatically.
I'm working under Mac OS X and my text window doesn't really map these
functions automatically - it works fine under Windows. Is there an
easy way to map copy&paste functions to a text window under Mac OS X?
This is what I'm doing with my text
2004 Mar 07
2
Excel files
Hello,
I was trying to import data from an Excel file. After I imported the data, I was trying to make a scatter plot.
The X axes variable is a time variable, which occupies two columns, one is date, another one is time. Example 21-Apr-03, 4:10 PM. My qestion is:
1. How can I access the data of certain column? I mean how can I refer it in R?
2. How can I make the two column character
2009 Feb 26
42
Need to test serial port connection
I recently bought a new UPS, and I''m attempting to use nut to monitor it.
Following setup instructions everything seemed to go well until it came to
testing the connection, which failed.
There is just one serial connector on the computer, so I set it to
monitor /dev/ttyS0. Either that is wrong, or communication is failing.
I''ve been told to try minicom to monitor it,
2012 Jan 26
1
ftable.formula
I apologize in advance if this is the wrong forum for this
report/request, and for the fact that I have not read the code for
ftable.formula in any detail.
>From reading the documentation for ftable.formula, I expected that the
following two calls to ftable would produce the same results:
data(UCBAdmissions)
ftable(UCBAdmissions, row.vars = "Dept", col.vars = c("Gender",
2006 Jul 29
9
export to a CSV or XLS file
hello everyone,
Any idea how can i export a resultset from a database to a CSV or XLS
file from the application ? would like the user to have the option to
export selected data to a CSV/XLS file.
Any plugins or libraries avaiable to accomplish this ?
Thanks for your time,
VASU.
--
Posted via http://www.ruby-forum.com/.
2006 Feb 13
1
JRG Console Output
All,
I had a question about the JGR console and whether or not I can
manipulate the location where line wrapping occurs. I have searched
'JGR' in the R listserve archives and attempted to find console
manipulation on the JGR website to no avail and could use some
direction.
TIA, Bret
As an example, the below output wraps every 4th value, leaving about
2/3 of the console empty.
>
2006 May 09
4
ruby equivalent of phpinfo()
Is there a ruby equivalent for the phpinfo() php function that displays
all the variables and environment settings ?
Thanks,
vasu.
--
Posted via http://www.ruby-forum.com/.
2024 May 16
2
Current version of R, 4.4.0 and patch to correct the bug fix related to the RStudio viewer pane on Windows systems
Do you receive RDS objects from unknown (untrusted) sources?
?? If not - the security issue is a non-issue as I understand it.
On Thu, 16 May 2024, 16:21 Vega, Ann (she/her/hers) via R-help, <
r-help at r-project.org> wrote:
> I help to coordinate the USEPA's R user group. We have over 500 members
> and our security officer has required us to update to R version 4.4.0
>
2006 May 01
2
Pasting data into scan()
The file TENSILE.DAT from the Hand et al "Handbook of Small Data Sets"
looks like this:
0.023 0.032 0.054 0.069 0.081 0.094
0.105 0.127 0.148 0.169 0.188 0.216
0.255 0.277 0.311 0.361 0.376 0.395
0.432 0.463 0.481 0.519 0.529 0.567
0.642 0.674 0.752 0.823 0.887 0.926
except that my mail client has replaced the tab separators by blanks. If
I paste this data into R 2.2.1 what I get is