I was wondering if there is a way to get an exact p-value at times where R
gives me just a range . for example
t.test(x,y)
p-value < 2.2e-16
thanks,
--
View this message in context:
http://r.789695.n4.nabble.com/getting-the-exact-p-value-tp3075107p3075107.html
Sent from the R help mailing l
Hi All
I still have a problem with “bitmap” function in R, I have downloaded
ghostscript 8.71 and added the path to the executable to the path
environment variable, by going to the control panel , system, advanced
system settings, added C:\Program Files(x86)\gs\gs8.71\bin to the path
variable.
Hi All
I still have a problem with “bitmap” function in R, I have downloaded
ghostscript 8.71 and added the path to the executable to the path
environment variable, by going to the control panel , system, advanced
system settings, added C:\Program Files(x86)\gs\gs8.71\bin to the path
variable. I
Hi,
if I use the jpeg driver directly like
one <- read.table("sample.txt",sep="\t")
jpeg(file="sample.JPG)
plot(V2 ~ V1,one)
and it did not plot anything! why is that?
the version of ghostscript that I installed i from the following link
http://pages.cs.wisc.edu/~ghost/doc/GPL/gpl871.htm
Hi All,
I am trying to run the following script but I am getting and error message
one=read.table("sample.txt",sep="\t")
bitmap(file="sample.JPG",type="jpeg",width=5,height=5,res=300,pointsize=10)
“Error in (st + 1):(en - 1) : argument of length 0”
plot(one$V1,one$V2)
I tried to google the error
Hi All,
I have a dataset that I would like to split based on : or – ( the data file
is tab delimited) for example:
Ny:23-45AC
BA:88-91DB
KJ:21-13PA
And I would like the data to be splitted and the final results look like
NY 23 45 AC
BA 88 91
Hi All,
I have been trying to plot multiple line plots with different colors on one
figure. in my example below I was able to plot cat vs num1 as a dot plot
connected with lines but was not able to do that for cat vs num2 and I do
not know how to add the third plot cat vs num3. below is my code
Hi All,
I need to make a dot plot where the points of the plot are connected with
lines.is the possible to do in R?
Also, I do nto know how to combine two plots into one plot?
thanks and I appreciate your help
--
View this message in context:
http://n4.nabble.com/dot-plot-tp1745415p1745415.ht
Hi ,
I have tried
gsub(".*York(\\d+).*", "\\1", grep("New York", x, value = TRUE))
and outputs
"P New York722AZ" "K New York20"
but that is not what i want, I want the output to be
722,20
--
View this message in context:
http://n4.nabble.com/using-grep-tp1571102p1571251.html
Sent fro
Hi All,
I have a character vector with naems of cities in the us. I need to extract
the number that appear after the word "New York", for example,
x<-c("P Los Angeles44AZ", "P New York722AZ", "K New York20")
I want the results to be
722, 20
cab I use the grep function, if so how?
I apprecia
Hi ,
I have several commands that I want to run, I was wondering if there is an
easy way to reset my variables before the start of each run
for ( i in 1:200){
reset the variables
run the commands
}
My solution right now is to set all my vectors to 0 and my data frames to
NULL after the start o
thank you all for your help, the get() function worked perfectly.
--
View this message in context:
http://n4.nabble.com/performing-the-same-commands-on-two-different-data-sets-tp1474452p1474515.html
Sent from the R help mailing list archive at Nabble.com.
__
Hi All,
I would like to perform the same set of commands on the two different sets.
I would to avoid writing the same set of command twice so I was wondering if
there is an smart way to do this. I was thinking to use a loop as follows
Data<-read.table(file=”data.txt”, header=T, sep=’\t’)
D1<-Da
Hi All,
I am working on an example where the electric utility is investigating the
effect of size of household and the type of air conditioning on electricity
consumption. I fit a multiple linear regression
Electricity consumption=size of the house hold + air conditioning type
There are 3 air
Hi All,
I have a problem cbind two vectors one is a numeric and the other is an
mpfr object and then saving the result into a .csv file. I am unable to save
the mpfr vector into .csv file . here is the error that I get
Error in as.data.frame.default(x[[i]], optional = TRUE) :
cannot coerce c
Hi All,
thank you all for your help. I have tried Bill's script and it works! so I
am trying to think what was the problem and it looks like it i sthe
precision. so you defined a function of the precision and evaluates at
precision=500. Bill, I was wondering how did you choose 500? is it
arbitrar
Hi All,
I was wondering if R can deal with high precsion numbers, below is an
example that I tried on using R and Maple where I got different results. I
was not able to use the r-bc package in R, instead I used the Rmpfr
package, below are both R and Maple results
> library(Rmpfr)
>
> s<-mpfr
I have tried to redownload the zipped folder form the following link
http://code.google.com/p/r-bc/downloads/list , windows is not giving me a
permission to extract the files.did anyone try it?
--
View this message in context:
http://n4.nabble.com/problems-using-the-bc-package-tp1288765p128880
Hi All,
I am hoping that someone have an answer for this. I have downloaded the bc
package form the following link
http://code.google.com/p/r-bc/
from "on windows" and saved the file under R/library
I am using R form windows vista, when I open R, bc does not appear under
load packages.
I have
Hi ,
Thanks for your help, I have been trying to use the bc package but I am
getting the following error
"Error in system(cmd, input = input, intern = TRUE) : -l not found"
any idea??
--
View this message in context:
http://n4.nabble.com/problem-with-the-precision-of-numbers-tp1017727p10179
Hi All,
I was wodering if it is possible to increase the precision using R. I ran
the script below in R and MAPLE and I got different results when k is large.
Any idea how to fix this problem? thanks for your help
for (k in 0:2000){
s=0
for(i in 0:k){
s=s+((-1)^i)*3456*(1+i*1/2000)^3000
}
}
Hi All,
I need to sum a large number of extremely small numbers. These small number
are a result of an expression that I wrote using R but the sum of these
numbers is incorrect because the numbers perhaps get truncated.
How van I make sure that R us summing the numbers without rounding or
trunca
Hi All,
I have a quick question regarding Principal component. I ran principal
components on two data sets cases and controls. I am interested in knowing
if there is a significant difference between the cases and the controls, I
was wondering if there is a test that test if there is a significan
Hi All,
I always have a problem with write.csv when I want the column names to be
ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc.
for example I tried
write.csv(mydata, file="data.csv", quote=FALSE, row.names=F, col.names=F)
Warning message:
In write.csv(mydata, file = "
Hi All,
I am a windows user and I would like to run several R scripts one after the
other, I was wondering if that is possible to do on windows instead of
clicking on each script to run it.
Thanks
--
View this message in context:
http://n4.nabble.com/How-to-run-several-scripts-tp972862p97286
Hi All,
I have a character vector of length=700. The vector contains names and I
want to extract the names that contain the number 101. The number 101 could
be anywhere within the name.
what is the best way to do this?
--
View this message in context:
http://www.nabble.com/How-to-extract-n
Hi All,
I was wondering if if it is possible to change the font style and the font
size for x labels, y labels and the main title for a box plot?
Thanks
--
View this message in context:
http://www.nabble.com/box-plot-tp25752195p25752195.html
Sent from the R help mailing list archive at Nabble.
I am having difficulties interpreting a cdplot, I have a binary variable y
that I want to cdplot against a continuous variable x,below is the R command
cdplot(y~x, data=mydata)
you get a plot with a dark shaded area and a light shaded area. what do
these areas mean? and how to interpret the p
Hi All,
I would like to run a linear model where the response is the duration of
relief in days and the regressor is the drug dosage in mg. Then I would like
compute the predicted values of the duration of relief from the model and
merge it into the original data. I am not sure how the merge happ
I am trying to plot survival curves and here is the code
plot(survfit(Surv(days,status)~group, data=g3),
lty=1:2, mark.time=F,
ylab="Probability",
xlab="Suvival Time in Month")
legend(10, 0.2,legend=c("Control","RIT"), lty=c(2,1),
title="Hormonal Therapy", bty="n")
I will get two survival plot
Hi All,
I have a file with two columns, the first column has the names of the
patients and the second column has the age. I am looking into creating an
output file that looks like
1-1010-20etc
EricChris
Bob mat
Andrew
Suzan
Where each column has the nam
I am looping over a data set and at each loop I am creating a dataframe
“mydata”
That I wanted to be saves in a .csv file, but I want all the results to be
saved in the same file and this is the way I do it
write.csv(mydata, file= “data.csv”=F, append=T) . the csv file looks fine
but I always get
Hi,
How can I find the p-value for the F test for the interaction terms in a
regression linear model lm ?
I appreciate your help
--
View this message in context:
http://www.nabble.com/F-test-tp23078122p23078122.html
Sent from the R help mailing list archive at Nabble.com.
Hi All,
I am trying to fit a linear regression between the tool speed and the tool
type ( type A, Type B , Type C) where the response is the tool speed and the
regressor is the tool type.
I introduced two dummy variables X1 and X2 as follows
X1 X2
Tool A 0 0
Tool B 0 1
To
I have a file where the missings are coded as NA or blank. how can I tell R
to read the data set and to consider the missings NA or a blank.
I tried the following
data<-read.table("data.txt", sep='\t', header=T, na.strings=c("NA",""))
is it correct? I am new to R and I am not sure if R is con
Hi All,
I have about one hundred patients and all the patients had their glucose
measured on three different days. The days are all the same for all he
patients. So I have three measurement for each patient . I want to know
whether the day when the glucose was measured has an effect on the
measu
Hi All,
this might be an easy question but I do not know
how to find R-squared for a QQplot when doing linear regression?
--
View this message in context:
http://www.nabble.com/QQplot-tp22288218p22288218.html
Sent from the R help mailing list archive at Nabble.com.
_
t; data.frame, "data"? Have you tested this loop without the sink's to
> see if it produces anything meaningful?
>
> Once you test the process, then issue the sink(filename, append=TRUE)
> once, before the loop, do your analyses in the loop, and then close
> with sink(
; 801.408.8111
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
>> project.org] On Behalf Of kayj
>> Sent: Tuesday, February 17, 2009 10:52 AM
>> To: r-help@r-project.org
>> Subject: [R] printing out the
Hi All,
I am trying to run several linear regressions and print out the summay and
the anova reslts on the top of
each other for each model. Below is a sample progarm that did not work. is
it possible to print the
anova below the summary of lm in one file?
thanks for your help
#
I want to know how accurate are the p-values when you do linear regression in
R?
I was looking at the variable x3 and the t=10.843 and the corresponding
p-value=2e-16 which is the same p-value for the intercept where the t-value
for the intercept is 48.402.
I tried to calculate the p-value in R
I have a problem with ifelse(), I do not understand how it works.
> X<-c(2,2,1,1,0,0)
> str(X)
num [1:6] 2 2 1 1 0 0
> Y<-ifelse(X>0,1,0)
> Y
[1] 1 1 1 1 0 0
>
Can some one explain what is going on, I do not understand what ifelse is
doing in this case. Can someone explain the output Y.
Thank
I have a problem with ifelse(), I do not understand how it works.
> X<-c(2,2,1,1,0,0)
> str(X)
num [1:6] 2 2 1 1 0 0
> Y<-ifelse(X>0,1,0)
> Y
[1] 1 1 1 1 0 0
>
Can some one explain what is going on, I do not understand what ifelse is
doing in this case. Can someone explain the output Y.
Thank
Hi ,
Does any one know how to split a character vector , I have a vector X that
looks like this and each row has 3 characters
X
ASK
DGH
ASG
AUJ
FRT
I would like to split the vector into 3 vectors that look like this
X1 X2 X3
A S K
D G H
A S G
A
l[3,1],l[2,1],l[1,1]))
and that did not work, how can I use variables to create a vector?
kayj wrote:
>
> I am looking into change the numeric order in the level of the factor
>
>> x<-c("A","B","C")
>> fx<-factor(x)
>> fx
> [1
I am looking into change the numeric order in the level of the factor
> x<-c("A","B","C")
> fx<-factor(x)
> fx
[1] A B C
Levels: A B C
> factor(x)
[1] A B C
Levels: A B C
> as.numeric(fx)
[1] 1 2 3
I want to change the order of the numeric into 3 corresponds to “A” level, 2
corresponds to “B”
Hi,
I do have a data set with some missing values that appear as blanks. I want
to fill these blanks with an NA. How can this be done? Thanks for your help
--
View this message in context:
http://www.nabble.com/filling-blanks-with-NA-tp21584278p21584278.html
Sent from the R help mailing list
Hi All,
I was wondering if there is anything that breaks a loop in R. For example,
For (k in 1:100)
For ( i in 1:10){
If ( condition ){
Break the inner loop
}
}
}
In the above case, if the program runs the if statement, then I want the
inner loop for (i in 1:10) to stop looping and skip t
Hi all
I have a data set with the total number of columns =ncol, and the total
number of rows=nrow. I am trying to loop over the values and id the value is
less than or equal to 100 to be changed to 1. if the value is greater than
100 , to be changed to 0. if NA , let X[i,j]=NA. I ran into a pro
I have a huge txt file and I only want to get out of it column 3 and 7.
I tried to read the whole file and then extract the two columns, but I ran
into a memory problem since the file is huge.
Is it possible just to tell R to read these two columns without reading the
whole file?
Thanks
-
Hi All,
I have a column that contains values between 0 and 1. I would like to make
a table that consists of the number of elements in each category.
For example , how many elements have values between 0 and 0.1, 0.1 to 0.2,
0.2 to 0.3,etc……..0.9 to 1.
Is there an easy way to do this?
Thanks
; On Fri, Oct 3, 2008 at 4:48 PM, kayj <[EMAIL PROTECTED]> wrote:
>>
>> Hi All,
>>
>> I want to merge file 2 into file 1 , is it possible to get the rows from
>> file 2 that did not end up in the merge result?
>>
>> Thanks
>>
>> --
>>
Hi ,
I was wondering if we can color the font in R ?
thanks
--
View this message in context:
http://www.nabble.com/font-color-tp19807473p19807473.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
http
Hi All,
I want to merge file 2 into file 1 , is it possible to get the rows from
file 2 that did not end up in the merge result?
Thanks
--
View this message in context:
http://www.nabble.com/merge-tp19805328p19805328.html
Sent from the R help mailing list archive at Nabble.com.
_
I have a huge txt file and I only want to get out of it column 3 and 7.
I tried to read the whole file and then extract the two columns, but I ran
into a memory problem since the file is huge.
Is it possible just to tell R to read these two columns without reading the
whole file?
Thanks
--
Hi,
I have a txt file here I want to split it into different files based on the
column name if it contains a specific word or part of a word. For example,
If the header looks like
A001_Sick A015_SBK99_SickL913_BB
I would like to split the data , one file contains the data with
I do have a txt file where each row is a record and the first element of
each record is an id for an individual. I am looking into combing the
records into one row if the id is the same and save as a txt file. Notice
that the rows may not have the same length in the result file that I want to
cre
I do have some data of dim 100*3 (i.e 100 rows and 3 columns ) stored in a
txt file. I want to read the data into R, Perform the same operation in
each row and store the result in a forth column( that I should create).
I do not know how I can create a forth column to store the result of the
ope
Hi,
I am reading numeric data as below but the problem is the object ndata1 and
nd1 have characters instead of numeric values. I want to keep it as numeric.
Why the type has changed from numeric to character and how to avoid this
problem?
rdata1<- read.table(file="data1.txt", header=F,stringsA
I am trying to use rbind to have the two data on the top of each other but I
am getting an extra X on the column header and the rows are numberd , How to
get rid of this problem? I appreciate your help
x1<- read.table(file="data1.txt", header=T, sep="\t")
x2<-read.table(file="data2.txt", head
I have two set of data, Data1 and Data2 . Data1 has a header and Data2 does
not. I would like to merge the two data sets after removing some columns
from data2 .
I am having a problem merging so I had to write and read final data and
specify the “header=F” so the merge can be done by”V1”. Is the
is it possible to sort a file by the row names?
--
View this message in context:
http://www.nabble.com/sorting-by-the-row-names-tp19090189p19090189.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
http
Hi all,
I have data with several columns and rows. one of the column is "Type" that
can be either A, B, C or D.
I need to plot the "Type" variable as a bar plot where the x axis is the
type A, B ,C or D and the y axis shows the percentage. I was not able to get
a bar plot. it seems that I need to
Hi All,
I have a data with 15 columns. the first 10 column are dependent(y’s)
variables and the following 5 an columns are the independent variables(x’s)
( MY DATA HAS A HEADER WITH THE NAME OF THE VAIABLES). I need to apply
linear regression y=a+bx where I need x to be one of the independent
va
I have a problem with reading a file data.txt that has a header
Each row has the individual ID and then some data that are letter and
numbers such as 00
If I read the file as
data<-read.table("data.txt",sep='\t', header=T)
write.table(data,file="data1.txt", sep='\t', quote=F, col.names=T,
Hi All,
I am looking into merging 3 data sets I know how to do that by merging data1
with data2 and then merging the result with data 3. I was wondering if it
can be done all at once so I tried,
M<-merge(data1,data2,data3, by=”ID”)
It does not work!
Any ideas?
--
View this message in contex
Thanks a lot for your help, I appreciate it.
David Winsemius wrote:
>
> Thanks for your reply.
>
> In your last step If I create a duplicate ( two similar records )
> # create a duplicate
> vv[8,1] <- 7
> vv[8,2]<-'g'
>
> and then I merge vv with vv2 ,both duplicates are merged. Is the
since they are not in data1 , I do not want them to be in the merge result.
Moshe Olshansky-2 wrote:
>
> Where do you want to place ID's which are in data2 but NOT in data1?
>
>
> --- On Wed, 4/6/08, kayj <[EMAIL PROTECTED]> wrote:
>
>> From: kayj <[EM
I would like to merge “data1 “that contains 100 unique ID’s with another
data set “data 2” with 150 ID’s and the age of those individuals ( the ID in
data1 is a subset of the ID in data 2) I would like to merge these data1
with data2 and have the result of the merge to have the ID ordered as in
Thanks for your reply.
In your last step If I create a duplicate ( two similar records )
# create a duplicate
vv[8,1] <- 7
vv[8,2]<-'g'
and then I merge vv with vv2 ,both duplicates are merged. Is there a way to
tell R to merge only the unique records.
Thanks and appreciate your help.
--
I have two data sets data1 and data2 with no column names( No header). The
first coluimn in both data sets represents the case ID. How can I tell R to
merge the two data sets by the case ID if there is no header? Also, In data1
I have more cases and I would like the result of the merge to have al
Hi All,
I performed an svd on a matrix X and saved the first three column of the
left singular matrix U. ( I assume that they correspond to the projection of
the matrix on the first three eigen vectors that corresponds to the first
three largest eigenvalues). I would like to know how much varian
hello,
I have data of individuals; with their age and other infromation. Each row
corresponds to a single individual. I would like to divide the data and
store them into two files. one file with people less than 50 years of age
and the other with people more than 50 years of age. I am new into R
Hi,
I tried to run SVD on a 500,000* 500,000 matrix and i get a message that it
can not allocate a vector of length 270 mb
doe snayone know how to solve this problem? any ideas on other softwares
where I can do this?
I appreciate your help
thanks
--
View this message in context:
http://w
Hi,
I am new to R an dI need some help
I have a matrix of real values 100*300 and I would like to calculate the
mean for each column , then for each entry in a column i need to subtract
the mean so I will have a matrix where the columns have zero mean. any one
know how to do that . Thanks
--
V
Hi All,
I am a new user in R and I would like to buy a book that teaches me how to
use R. In addition, I may nees to do some advanced statistical analysis.
Does anyone recommend some books or websites where I can learn R.
Thanks
--
View this message in context:
http://www.nabble.com/I-ne
76 matches
Mail list logo