HI,
This should also work:
df1<-read.table(text="
FID MID IID EW_INCU EW_17.5 EMW EEratio
1 4621 TWF2H5 45.26 NA 15.61 NA
1 4621 TWF2H6 48.02 44.09 13.41 0.3041506
2 4630 TWF2H19 51.44 47.81 NA NA
2
HI,
Try this:
df1<-read.table(text="
FID MID IID EW_INCU EW_17.5 EMW EEratio
1 4621 TWF2H5 45.26 NA 15.61 NA
1 4621 TWF2H6 48.02 44.09 13.41 0.3041506
2 4630 TWF2H19 51.44 47.81 NA NA
2 4631 TWF2H21
On 16/12/12 18:38, Tjun Kiat Teo wrote:
Suppose I have a matrix of data
A
1 2 3
4 5 6
7 8 9
And I have a vector of indexes 2,1,3
For row 1 of matrix A I want the 2nd element 2
For row 2 of matrix A I want the 1st element 4
For row 3 of matrix A I want the 3rd element 9.
Is there a
check the help file. ?aggregate says that it ignores missing values by
default ;)
df <- read.table( header = TRUE , text = "FID MID IID EW_INCU
EW_17.5 EMWEEratio
1 4621 TWF2H545.26NA 15.61 NA
1 4621 TWF2H648.0244.09
On Dec 15, 2012, at 9:38 PM, Tjun Kiat Teo wrote:
> Suppose I have a matrix of data
>
> A
>
> 1 2 3
> 4 5 6
> 7 8 9
>
>
> And I have a vector of indexes 2,1,3
>
> For row 1 of matrix A I want the 2nd element 2
> For row 2 of matrix A I want the 1st element 4
> For row 3 of matrix A
Suppose I have a matrix of data
A
1 2 3
4 5 6
7 8 9
And I have a vector of indexes 2,1,3
For row 1 of matrix A I want the 2nd element 2
For row 2 of matrix A I want the 1st element 4
For row 3 of matrix A I want the 3rd element 9.
Is there a quick way to do it ?
Tjun Kiat
On Dec 15, 2012, at 8:45 PM, David Winsemius wrote:
>
>
>>
>> Trying read.csv gives this:
>>
>>
>> Error: cannot allocate vector of size 370.5 Mb
>
> That on the other hand suggests you have inadequate machine resources for
> this job. Perhaps you should be thinking of using other tools th
Hi!
Is it a data frame, please?
Have you tried the "table" function or "cut" function?
Sincerely,
Erin
From: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org] on
behalf of Elaine Kuo [elaine.kuo...@gmail.com]
Sent: Saturday, December 15,
On Dec 15, 2012, at 2:23 PM, wrote:
> Dear R experts,
>
> For quite some time I have been trying to solve a mistery of reading a
> seemingly trouble-free text file. The data is temperature reconstruction
> arranged as a huge grid, preceded by seven "header lines" (which you see
> better if f
Hi Igor,
It appears that the encoding is UTF-16.
> readLines("temp-mon.txt")
[1] "þÿ" "" "" "" "" "" "" "" ""
"" "" "" ""
[14] "" "" "" "" "" "" ""
A search for "þÿ" leads to the Wikipedia page
http://en.wikipedi
Hello,
Yes, it is a data frame.
This is the first time to hear "table" function or "cut" function.
Please kindly point out how to use them.
By the way,
if the dataset (data frame) includes more than 2000 kinds of butterfly
range sizes and the latitude of range midpoints,
please kindly help with
Hello
I have a table describing butterfly range traits.
It is composed of three columns as below
Species name range size (X)latitude of range midpoint (Y)
There are 11 kinds of butterflies.
Each has its range size, and the latitude of each range midpoint ranges
from 9 to 19.
I woul
Hello
I have a table describing butterfly range traits.
It is composed of three columns as below
Species name range size (X)latitude of range midpoint (Y)
There are 11 kinds of butterflies.
Each has its range size, and the latitude of each range midpoint ranges
from 9 to 19.
I woul
Hello, could you tell me which is the command for create graphics of this prior
distributions:
Uniform (flat prior)
Jeffrey's
Thanks,
Tania
Sent from my iPod
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE d
Dear All:
I am trying to calculate four columns' means in a dataframe like this:
FID MID IID EW_INCU EW_17.5 EMWEEratio
1 4621 TWF2H545.26NA 15.61 NA
1 4621 TWF2H648.0244.09 13.41 0.3041506
2 4630 TWF2H19 5
Hi,
ylim=c(0,15000)
HTH
Pascal
Le 12/12/16 9:14, Tom Hoffrichter a écrit :
Hi everybody,
just arrived at R and immediately I got a problem.
Here's my script:
setwd("C:/Users/Tom/Eigene Tools/Programming/R/Data")
blast_hits<-read.table("blastHit_covLenght.txt", header=T)
blast_hits <-
try ylim=c(0,1500)
You are missing the "c" which constructs a vector, without the "c" it gets
confused.
On Sat, Dec 15, 2012 at 5:14 PM, Tom Hoffrichter <
tom.hoffrich...@googlemail.com> wrote:
> Hi everybody,
>
>
>
> just arrived at R and immediately I got a problem.
>
> Here's my script:
>
>
Dear R experts,
For quite some time I have been trying to solve a mistery of reading a
seemingly trouble-free text file. The data is temperature reconstruction
arranged as a huge grid, preceded by seven "header lines" (which you see better
if file is opened in Firefox or Chrome).
This is the d
Hi everybody,
just arrived at R and immediately I got a problem.
Here's my script:
setwd("C:/Users/Tom/Eigene Tools/Programming/R/Data")
blast_hits<-read.table("blastHit_covLenght.txt", header=T)
blast_hits <- as.matrix(blast_hits)
numerical1<-data.matrix(blast_hits, rownames.force = NA
Dear All,
The latest issue of The R Journal is now available
at http://journal.r-project.org/current.html
Thanks to everyone involved.
Martyn Plummer
Editor-in-Chief
---
This message and its attachments are strictly confidenti.
Hi Pradip,
It this is just formatting issue, it is possible to do that with ?formatC() or
?sprintf(), but it may change those variables from numeric to character.
One possibilty from `res`:
res<-data.frame(dat1[,1:2],read.table(text=Lines2,header=TRUE))
varsNum<-sapply(res,is.numeric)
res[varsNu
Hi there,
I'm new to R and need some help. I have a dataset of 30,000 records with a
response (1/0) indicator resulting in a response rate of 29%. I have 1
categorical predictor variable (gender - M/F) and two continuous variables
("score" and age). When I create an rpart model, I only get one
In creating that function, you may want to skip numeric fields so they do
not get trimmed:
> trimstr <- function(x, len=10) { if (is.numeric(x))
+x else substr(x, 1, len)
+ }
> x
c1 c2
1 -0.1674062 ABCDEFGHIJKLMNOPQRSTUVWXYZ
2 2.1589942 ABCDEFGHIJKLMNOPQRSTUV
David ... thank you.
OK ... so it appears there's no direct way to do this. But I could write a
function for printing data frames that would utilize your suggested approach,
data.frame(lapply()). This way, I could simply call the function with the data
frame object as the argument.
Thanks a
You are in Circle 2 of 'The R Inferno'.
You are wise to want to leave.
http://www.burns-stat.com/pages/Tutor/R_inferno.pdf
Pat
On 15/12/2012 15:10, Yong Wang wrote:
Dear list;
How can I speed up the run of following code (illustrative)
#===
Hi,
I was trying to call chart.Posn. I ran into an unusual problem. It
complains that:
Error in strheight(axt):
X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*..., face 1 at size 11
could not be loaded.
I am wondering how to fix this? It seems something is missing from X11
device but I don't k
Hi Arun,
Thank you so much for further clarifications and help.
Pradip
Pradip K. Muhuri, PhD
Statistician
Substance Abuse & Mental Health Services Administration
The Center for Behavioral Health Statistics and Quality
Division of Population Surveys
1 Choke Cherry Road, Room 2-1071
Rockville, MD
On 15/12/2012 17:36, Uwe Ligges wrote:
You have to specify the repository as
"file:Q:/Integrated Planning/R"
(and I am not entirely sure if blanks are supported).
Actually, that's not right: see ?url. All URI schemes start like
file:// . For Windows the help says
In this form the pat
You have to specify the repository as
"file:Q:/Integrated Planning/R"
(and I am not entirely sure if blanks are supported).
Best,
Uwe Ligges
On 13.12.2012 11:52, Tommy O'Dell wrote:
Hi everyone,
I've followed the instructions from R-Admin Section 6.6 for creating a
local repository. I've m
Hello, could you tell me how to run a MCMC with binomial distribution?
If there is an example will be nice to know about it.
Thanks,
Tania
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/l
On Dec 15, 2012, at 8:27 AM, Mauricio Cornejo wrote:
> Hello,
>
> Is there a way to set the maximum width of character columns when printing a
> data frame?
>
> I've looked into print(), format(), and options() and have been unsuccessful.
>
> For example, I'd like to achieve the results below
On 12-12-15 10:10 AM, Yong Wang wrote:
Dear list;
How can I speed up the run of following code (illustrative)
#
con<-vector("numeric")
for (i in 1:limit)
{
if(matched data for the ith item found) {
if(i==1) {co
Hello,
Is there a way to set the maximum width of character columns when printing a
data frame?
I've looked into print(), format(), and options() and have been unsuccessful.
For example, I'd like to achieve the results below without having to modify the
data itself.
> x <- data.frame(c1=rno
Please read the posting guide. You need to provide reproducible code (please
simplify, but make sure it illustrates your problem and runs) to communicate
clearly what problem you are trying to solve.
Chances are good that you don't need any for loop at all, but without running
code we can't tel
Dear Arun and David,
I am so grateful to you for all your help with the code. Thanks and regards,
Pradip
Arun - All this is very helpful. In general, I can follow the code. I only
have the following questions:
What changes in the code would be required to have 3 places after decimal for
Dear list;
How can I speed up the run of following code (illustrative)
#
con<-vector("numeric")
for (i in 1:limit)
{
if(matched data for the ith item found) {
if(i==1) {con<-RowOfMatchedData } else
{con<-rbind(con
Hello,
What about the median ranks? This test is based on ranks.
Regards,
Pascal
Le 12/12/15 18:04, Omphalodes Verna a écrit :
Dear list!
I work with multiple Kruskal-Wallis test (kruskalmc, package pgirmess), which
evaluates differences in medians among groups (5 groups). A result of a tes
Dear list!
I work with multiple Kruskal-Wallis test (kruskalmc, package pgirmess), which
evaluates differences in medians among groups (5 groups). A result of a test is
significant differences among some groups, while median values are the same for
4 groups (using tapply). Why?
p.s.: number of
Hi
My code is as following:
#include
#include
//* the Projector part *//
void Projector(double *L, int *dimL, double *G, int *dimG, double *W, int
*dimW, int *xymod, int *dimxy, double *modif, int *dimif, double *Lsum)
{ ...}
//* the interface part *//
#define getDim(A) INTEGER(coerceVector(
39 matches
Mail list logo