Hello,
It's an alternative to use SAS by function in R?
I want to plot d histograms by plot.from example bellow:
Thank you!
plot d
1 1 16.3
2 1 25.0
3 1 57.8
4 1 17.0
5 2 10.8
13 2 96.4
17 3 76.0
18 3 32.0
19 3 11.0
20 3 11.0
24 3 10
On Jan 2, 2013, at 10:09 PM, Bert Gunter wrote:
Below ...
-- Bert
On Wed, Jan 2, 2013 at 9:54 PM, David Winsemius > wrote:
...
Search on "orthogonal polynomials".
Yes, but this does not explain what these have to do with ordered
factors and contrasts in a linear model.
That information i
Below ...
-- Bert
On Wed, Jan 2, 2013 at 9:54 PM, David Winsemius wrote:
...
> Search on "orthogonal polynomials".
>
Yes, but this does not explain what these have to do with ordered factors
and contrasts in a linear model.
That information is contained in "An Introduction to R," the tutorial
On Jan 2, 2013, at 9:22 PM, Ranjan Maitra wrote:
Dear friends,
Being very new to this, I was wondering if I could get some pointers
and guidance to interpreting the results of performing a linear
regression with ordinal predictors in R.
Here is a simple, toy example:
y <- c(-0.11, -0.49, -1.
Dear friends,
Being very new to this, I was wondering if I could get some pointers
and guidance to interpreting the results of performing a linear
regression with ordinal predictors in R.
Here is a simple, toy example:
y <- c(-0.11, -0.49, -1.10, 0.08, 0.31, -1.21, -0.05, -0.40, -0.01,
HI Elisa,
The data that you sent to me is a matrix, (not the list containing 16
matrices).
source("Elizanew.txt")
is.matrix(dat1)
#[1] TRUE
dim(dat1)
#[1] 558 12
dat1<-na.omit(dat1)
nrow(dat1)
#[1] 508
colMeans(dat1)
#[1] 970.1942 892.5579 893.3180 1629.0733 5692.8488 12529.8313
Le 02/01/13 17:38, Uwe Ligges a écrit :
On 02.01.2013 17:28, Marc Girondot wrote:
Le 02/01/13 16:03, Uwe Ligges a écrit :
On 02.01.2013 11:58, Marc Girondot wrote:
I use R 2.15.2 on MacosX 10.8.2
I have a problem checking for a package that I want to submit in CRAN.
When I check like tha
There is a SIGN.test in package:BSDA and it does not work as documented - it
returns
a matrix of confidence intervals in some situations and the documented htest
object
in others. E.g.,
> x <- log2(1:32)
> str(SIGN.test(x, md=1, alt="less", conf.level=1))
List of 8
$ statistic : Named
On 03/01/13 07:45, solafah bh wrote:
Hello
I used SIGN.test function in R 2.12.2 to apply one sample sign test and it is
worked well ,but I want to put statistic in a variable and I could not get this
value,
I used :
x=rnorm(100)
t=SIGN.test(x,md=0,alt="less")
t$rval[1]$statistic
the last co
On Jan 2, 2013, at 2:44 PM, Yuan, Rebecca wrote:
> Hello Ista,
>
> Thanks for mention this package, however, it will not support big file, where
> I got the error message:
>
> --
> Error in read.sas7bdat("C:/Documents and Settings/test.sas7bdat") :
> big endian files are
I fail to understand the purpose of your post. The error message seems
clear enough: either your matrices are not all numeric or you may have data
frames among them with non-numeric columns. Have you checked either or both?
?is.matrix
?is.numeric
as in
lapply(s,is.matrix(x) && is.numeric(x))
(wi
Hello Ista,
Thanks for mention this package, however, it will not support big file, where I
got the error message:
--
Error in read.sas7bdat("C:/Documents and Settings/test.sas7bdat") :
big endian files are not supported
--
Cheers,
Rebecca
-Origi
Hi,
Check this link
http://tolstoy.newcastle.edu.au/R/help/05/04/1765.html
set.seed(15)
list1<-lapply(1:3,function(i) matrix(sample(1:10,6,replace=TRUE),ncol=i) )
lapply(list1,function(x) colMeans(x,na.rm=TRUE))
[[1]]
#[1] 6.67
#[[2]]
#[1] 6.33 6.00
##
#[[3]]
#[1] 7.0 9.0 7.5
A.K.
Hi Rebecca,
I've had success with the sas7bdat package (
http://cran.r-project.org/web/packages/sas7bdat/ )
Best,
Ista
On Wed, Jan 2, 2013 at 5:15 PM, Yuan, Rebecca
wrote:
> Hello all,
>
> Thanks for the suggestions.
>
> I tried to import data from sas to R using foreign package. In the first
dear useRs,
i have a list containing 16 matrices. i want to calculate the column mean of
each of them.
i tried
>sr <- lapply(s,function(x) colMeans(x, na.rm=TRUE))
but i am getting the following error
>Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
can it be done in any other way? and
Hello all,
Thanks for the suggestions.
I tried to import data from sas to R using foreign package. In the first step,
I tried to use read.ssd() to convert the sas file sales.sas7bdat to SAS
Transport formats. But I got an error message as
---
How can I predict new data with a regression by the sm package.
predict() does not work for the sm results and I can't find any newdata
option.
[[alternative HTML version deleted]]
__
R-help@r-project
What version of R are you using?
I cannot replicate your results with R 2.15.2:
> df1 <- data.frame()
> df2 <- data.frame(foo=c(1, 2), bar=c("a", "b"))
> rbind(df1, df2)
foo bar
1 1 a
2 2 b
> df1 <- data.frame(matrix(0, 0, 2))
> names(df1) <- names(df2)
> rbind(df1, df2)
foo bar
1 1
> On Jan 2, 2013, at 12:37 PM, Yuan, Rebecca wrote:
>> I am wondering if there is an efficient way to read SAS data directly in R,
>> or what would be a better connection between SAS and R if I need to use R to
>> deal with data achieved from SAS?
>>
You may try foreign and SASxport packages:
ht
On Jan 2, 2013, at 12:37 PM, Yuan, Rebecca wrote:
> Hello all,
>
> I have got some data in SAS, and I export it to one excel workbook with
> multiple sheets, for example, each sheet has the sales information for each
> state. Then I need to use R to do plotting, analysis on those sales data,
The rbind on empty and nonempty data frames behaves inconsistently. I am
not sure if by design.
In the first example, first row is deleted, which may or may not be on
purpose:
df1 <- data.frame()
df2 <- data.frame(foo=c(1, 2), bar=c("a", "b"))
rbind(df1, df2)
foo bar
2 2 b
Now if we co
HI,
Assuming the structure is similar to this:
set.seed(15)
list1<-lapply(c(60,120),function(i)
as.data.frame(matrix(sample(1:100,240,replace=TRUE),nrow=i))) # with 2 list
elements
lapply(list1,function(x) x[-c(32,64,96,128,160,192),])
A.K.
- Original Message -
From: eliza botto
To
Hello all,
I have got some data in SAS, and I export it to one excel workbook with
multiple sheets, for example, each sheet has the sales information for each
state. Then I need to use R to do plotting, analysis on those sales data, where
I need to load the data from excel to R.
When I read th
I know that R can read cvs file, but could R read excel files?
For example, in the workbook, I have 3 sheets. How could I read for those three
sheets?
Thanks,
Rebecca
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of jim holtman
Hello all,
I am developing an R package. My package uses several
classes and functions from another package (package A). Normally, I could just
specify package A as imports or depends in my DESCPRITION and NAMESPACE files.
One function I use is F, which calls a bunch of other
functions including G
Some of you may recall that a few months ago I solicited advice and
opinions on both R-help and R-sig-teaching about an "introduction to R"
workshop I intended to present to a class of high school students
enrolled in a 3-year longitudinal science research class. Much lively
discussion ensued. Wel
Thank you Gabor for your quick response, but it didn't solve the issue, I still
got the same error message when calling the function.
BTW, is there any other way to get the prediction interval of nonlinear
regression than using nls2 package? If yes, I might be able to avoid the
possible hidden p
On Wed, Jan 2, 2013 at 1:23 PM, tn85 wrote:
> Dear All,
>
> I was trying to call a self-defined function that performs nonlinear
> regression and gets the corresponding prediction upper limit using nls2
> package. However, weird thing happened. When I called the function in the
> main program, an
Hello,
I have been struggling with this for a while, tried a few things, but no
clean solution so far. Here is an example from the documentation for
geom_line:
==
# Summarise number of movie ratings by year of movie
mry <- do.call(rbind, by(movies, round(mo
On Jan 2, 2013, at 10:45 AM, solafah bh wrote:
Hello
I used SIGN.test function in R 2.12.2 to apply one sample sign test
and it is worked well ,but I want to put statistic in a variable and
I could not get this value,
I used :
x=rnorm(100)
t=SIGN.test(x,md=0,alt="less")
t$rval[1]$statistic
Hello
I used SIGN.test function in R 2.12.2 to apply one sample sign test and it is
worked well ,but I want to put statistic in a variable and I could not get this
value,
I used :
x=rnorm(100)
t=SIGN.test(x,md=0,alt="less")
t$rval[1]$statistic
the last command work in the old version of R but
Dear All,
I was trying to call a self-defined function that performs nonlinear
regression and gets the corresponding prediction upper limit using nls2
package. However, weird thing happened. When I called the function in the
main program, an error message "fitted(nlsmodel): object 'nlsmodel' not
f
On Jan 2, 2013, at 9:00 AM, eliza botto wrote:
Dear useRs,
i have a data frame with 16 lists in it. each list has variable
number of lines. i want to create a loop which will start deleting
every 32nd line in each list, till the end of each list. more
precisely if a list has 200 rows i w
What does the
unzip(temp, "Brasil.shp")
function produce?
A "shapefile" is actually several files, and all must be present in order
to read the "shapefile".
I'd also suggest r-sig-geo for this kind of question.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-
use the XLConnect package to read/write Excel workbooks. It handles
multiple sheets just fine.
On Wed, Jan 2, 2013 at 12:03 PM, Yuan, Rebecca
wrote:
> I know that R can read cvs file, but could R read excel files?
>
> For example, in the workbook, I have 3 sheets. How could I read for those
> t
Dear useRs,
i have a data frame with 16 lists in it. each list has variable number of
lines. i want to create a loop which will start deleting every 32nd line in
each list, till the end of each list. more precisely if a list has 200 rows i
want to delete row number 32, 64, 96 and so on...for th
You can read the files into a "list" -- you don't want to create
unique object names for each one.
files <- list.files(..pattern to match files..)
results <- lapply(files, read.table, header = TRUE)
On Wed, Jan 2, 2013 at 10:14 AM, Dominic Roye wrote:
> Hello R helpers,
>
> I would like to aut
On 02.01.2013 17:28, Marc Girondot wrote:
Le 02/01/13 16:03, Uwe Ligges a écrit :
On 02.01.2013 11:58, Marc Girondot wrote:
I use R 2.15.2 on MacosX 10.8.2
I have a problem checking for a package that I want to submit in CRAN.
When I check like that, no problem or warning are detected.
sy
Dear all,
Happy New year!
I have used the 'crr' function to fit the 'proportional subdistribution
hazards' regression model described in Fine and Gray (1999).
dat1 is a three column dataset where:
- ccr is the time to event variable
- Crcens is an indicator variable equal to 0 if the event was a
Le 02/01/13 16:03, Uwe Ligges a écrit :
On 02.01.2013 11:58, Marc Girondot wrote:
I use R 2.15.2 on MacosX 10.8.2
I have a problem checking for a package that I want to submit in CRAN.
When I check like that, no problem or warning are detected.
system("R CMD check '[path]/phenology'")
I cre
Hello R helpers,
I would like to automate this code for many files of the same type. But I
don´t know how to make it. In particular, i don´t know how to read many
files each one as an r object with the name of the file. Then a for loop
would be sufficient, right?
Many thanks and a happy new year.
On 02.01.2013 11:58, Marc Girondot wrote:
I use R 2.15.2 on MacosX 10.8.2
I have a problem checking for a package that I want to submit in CRAN.
When I check like that, no problem or warning are detected.
system("R CMD check '[path]/phenology'")
I create the .tar.gz package with that. The fi
On 02.01.2013 14:38, pmouilhade wrote:
Hi everybody,
I have tried the following command to skip the load test:
R CMD INSTALL --build --no-test-load DistributionS4
I missed this message before.
Now the error is the excution of "zip" failed...
So your Rtools are not properly installed?
U
On 02.01.2013 13:06, pmouilhade wrote:
Hello all and happy new year !!!
I had a package that worked fine but since I switched to R 2.15.2, It is not
compatible anymore (I have the error message: not installed for
'arch=i386').
I have therefore updated Rtools 2.16 and Path variables as follow:
On 01/01/2013 05:00 AM, r-help-requ...@r-project.org wrote:
Dear all,
Is there an implementation of Simon& Makuch method of plotting the survival
function with time-dependent variables. I?m only able to find event.chart in Hmisc
for the purpose and I would prefer the Simon and Makuch method.
On 1/1/2013 3:43 PM, Prof Brian Ripley wrote:
On 01/01/2013 19:50, Michael Friendly wrote:
Given a data set with a group factor, I want to translate the numeric
variables to their
centroid, by subtracting out the group means (adding back the grand
means).
...
Yes. It is part of the calculat
Hi everybody,
I have tried the following command to skip the load test:
R CMD INSTALL --build --no-test-load DistributionS4
Now the error is the excution of "zip" failed...
Any clue ?
--
View this message in context:
http://r.789695.n4.nabble.com/problem-when-installing-a-R-package-tp4654404
On 02.01.2013 13:40, Data Analytics Corp. wrote:
Is there a way to create a list of all statistical test functions in
base R? For example, there's t.test, ks.test, chisq.test, etc. I'd
like to create a list of these test names because I keep looking for
different tests but never know what's ava
HI,
Try this:
which(mata==4,arr.ind=TRUE)
# row col
#[1,] 1 2
which(matb==4,arr.ind=TRUE)
# row col
#[1,] 3 1
A.K.
- Original Message -
From: Charles Novaes de Santana
To: r-help@r-project.org
Cc:
Sent: Wednesday, January 2, 2013 6:12 AM
Subject: [R] In which column a
Hello all and happy new year !!!
I had a package that worked fine but since I switched to R 2.15.2, It is not
compatible anymore (I have the error message: not installed for
'arch=i386').
I have therefore updated Rtools 2.16 and Path variables as follow:
PATH=C:\Rtools\bin;C:\Perl\bin;C\Rtools\Mi
HI,
May be this helps:
set.seed(5)
dat1<-as.data.frame(matrix(sample(1:100,100,replace=TRUE),ncol=20))
dat1[,8:ncol(dat1)]
A.K.
- Original Message -
From: eliza botto
To: "r-help@r-project.org"
Cc:
Sent: Wednesday, January 2, 2013 8:59 AM
Subject: [R] column selection
Dear R users
You have two options.
Q[, 117:ncol(Q)]
Or using the negation, thus not selecting the first 116 cols.
Q[, -1:-116]
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Klini
Hmmm... May be
q[, 117:ncol(q)]
And, by the way, do not use "q" as the name for your data.frame() or
matrix() as it is a reserved name. See ?q and
require(fortunes)
fortune('dog')
for reasons why.
HTH,
Jorge.-
On Thu, Jan 3, 2013 at 12:59 AM, eliza botto <> wrote:
>
> Dear R users,
> sorry
On 02-01-2013, at 14:59, eliza botto wrote:
>
> Dear R users,
> sorry for a very basic question. i wanted to ask that if your column are too
> much in number and you want to select the remaining columns, starting from
> column number 117. one way is to use usual command
>> q[ ,(117:2300)].
Dear R users,
sorry for a very basic question. i wanted to ask that if your column are too
much in number and you want to select the remaining columns, starting from
column number 117. one way is to use usual command
>q[ ,(117:2300)].
is there a way by which i can select the remaining columns
On 02/01/2013 12:40, Data Analytics Corp. wrote:
Hi,
Is there a way to create a list of all statistical test functions in
base R? For example, there's t.test, ks.test, chisq.test, etc. I'd
like to create a list of these test names because I keep looking for
different tests but never know what'
Hi,
Is there a way to create a list of all statistical test functions in
base R? For example, there's t.test, ks.test, chisq.test, etc. I'd
like to create a list of these test names because I keep looking for
different tests but never know what's available. I'm thinking of a
regular expres
Ups... sorry, guys! Basic mistake: I forgot to look for the
information in the help of the function.
Thank you, Gerrit, for the information! All the best!
Charles
On Wed, Jan 2, 2013 at 12:21 PM, Gerrit Eichner
wrote:
> Hi, Charles,
>
> see
>
> ?which
>
> and learn about the argument arr.ind.
>
Hi, Charles,
see
?which
and learn about the argument arr.ind.
Happy new year -- Gerrit
On Wed, 2 Jan 2013, Charles Novaes de Santana wrote:
Dear all, Happy New Year for all of you! I hope we have an year of
essential freedom for everyone!
I am trying to manipulate a matrix in order to
Dear all, Happy New Year for all of you! I hope we have an year of
essential freedom for everyone!
I am trying to manipulate a matrix in order to know in which column
and in which row a number is allocated. But, when we use the function
"which" it returns the position of the number in the "vector
I use R 2.15.2 on MacosX 10.8.2
I have a problem checking for a package that I want to submit in CRAN.
When I check like that, no problem or warning are detected.
system("R CMD check '[path]/phenology'")
I create the .tar.gz package with that. The file phenology_3.43.tar.gz
is generated. I can
On 02/01/2013 10:34, PIKAL Petr wrote:
Hi
I am not at all an expert in factor analysis but I would say that
myscores[1,1]
is a value of factor1 for the first row of your data frame. How would you like
the link to be performed. Easiest way seems to me cbind your data frame with
myscores.
m2 <
Dear Petr,
I tried that and it worked! Thanks, V
2013/1/2 PIKAL Petr
> Hi
>
> I am not at all an expert in factor analysis but I would say that
>
> ** **
>
> myscores[1,1]
>
> ** **
>
> is a value of factor1 for the first row of your data frame. How would you
> like the link to be
Hi
I am not at all an expert in factor analysis but I would say that
myscores[1,1]
is a value of factor1 for the first row of your data frame. How would you like
the link to be performed. Easiest way seems to me cbind your data frame with
myscores.
m2 <- cbind(m1, myscores)
However grater exp
Thanks Petr, very useful. Still, I need to link the scores to individual
observations in my original data frame. Is that possible? V
2013/1/2 PIKAL Petr
> Hi
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Virgile Ca
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Virgile Capo-Chichi
> Sent: Wednesday, January 02, 2013 9:33 AM
> To: R help
> Subject: [R] Extracting factors from "factanal"
>
> Dear R users
> Happy New year to all for a
Dear R users
Happy New year to all for a start. Below is some data that I ran a factor
analysis on. Using $score prints the scores for each of the three factors.
However, I would like to access those factors as variable for new
computations. How do I do that? In SPSS we just call fact1_1, fact2_1 e
67 matches
Mail list logo