[R] R studio server vs R server and Small computer to run R

2017-01-18 Thread John Sorkin
Please forgive my resending this help request. I sent it two days ago. To date I have not received any responses. Thank you, John I am looking for a small computer low power that I make available on the web that will run R studio server or R server 1) can anyone recommend a computer? 2)

[R] R studio server vs R server and Small computer to run R

2017-01-16 Thread John Sorkin
I am looking for a small computer low power that I make available on the web that will run R studio server or R server 1) can anyone recommend a computer? 2) can anyone let me know the advantages and disadvantages of R studio server and R server? Thank you John > John David Sorkin M.D., Ph.D. >

Re: [R] R in raspberry Pi

2017-01-02 Thread John Sorkin
Robin, Your chapter sounds very interesting. Unfortunately it appears that it is not available, at least not to me. John > John David Sorkin M.D., Ph.D. > Professor of Medicine > Chief, Biostatistics and Informatics > University of Maryland School of Medicine Division of Gerontology and >

Re: [R] Log plus one transformation in R

2016-12-13 Thread John Sorkin
ore, MD 21201-1524 > (Phone) 410-605-7119 > (Fax) 410-605-7913 (Please call phone number above prior to faxing) > On Dec 13, 2016, at 12:12 PM, Duncan Murdoch <murdoch.dun...@gmail.com> wrote: > >> On 12/12/2016 12:26 PM, John Sorkin wrote: >> David, >> >&

Re: [R] Log plus one transformation in R

2016-12-12 Thread John Sorkin
dicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) >>> David Winsemius <dwinsem...@comcast.net> 12/12/16 12:05 PM >>> > On Dec 12, 20

Re: [R] Log plus one transformation in R

2016-12-12 Thread John Sorkin
At the risk of being flamed . . . What is the difference between log1p(x) and log(x+1)? The two methods appear to give the same results: > log1p(0.01)/log(0.01+1) [1] 1 John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland

Re: [R] Log plus one transformation in R

2016-12-12 Thread John Sorkin
Faradj, I all you need to do is newvalue <- log(x+1) John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC

Re: [R] Write a function that allows access to columns of a passeddataframe.

2016-12-06 Thread John Sorkin
>>> Bert Gunter >>>> >>>> "The trouble with having an open mind is that people keep coming along >>>> and sticking things into it." >>>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) >>>> >>>

Re: [R] Write a function that allows access to columns of a passed dataframe.

2016-12-05 Thread John Sorkin
e) myfun(frame = mydf, var = age) [1] 2 3 I can get the name of the dataframe as a text string! [1] "mydf" I can get the name of the column as a text string! [1] "age" [1] 20 34 43 32 21 Hope this helps, Rui Barradas Em 05-12-2016 14:44, John Sorkin escreveu: > I am t

[R] Write a function that allows access to columns of a passed dataframe.

2016-12-05 Thread John Sorkin
I am trying to write a function which, when passed the name of a dataframe and the name of a column of the dataframe, will allow me to work on the columns of a dataframe. I can not get my code to work. Please see the code below. Any help in getting the function to work would be appreciated.

[R] Produce multiple line graphs

2016-09-25 Thread John Sorkin
I have a data frame that contains data for multiple (seven) subjects. Each subject is represented by a new value of PID. I would like to plot the data for all seven subjects. For each subject I want to plot a line showing CT as a function of Nit, with the dots for each subject joined. I have

[R] nlme: fewer observations than random effects in all level 1 groups

2016-08-25 Thread John Sorkin
I am getting a warning message when I run lme: Warning message: In lme.formula(fixed = value ~ CorT + time + CorT * time, data = GD) : fewer observations than random effects in all level 1 groups I don't know what the message means, nor if I need to be concerned about the message. I would be

[R] lme to determine if there is a group effect

2016-08-24 Thread John Sorkin
I apologize for sending this message again. The last time I sent it, the subject line was not correct. I have corrected the subject line. I am trying to run a repeated measures analysis of data in which each subject (identified by SS) has 3 observations at three different times (0, 3, and 6).

Re: [R] function that converts data into a form that can be included in a question to mailing list

2016-08-24 Thread John Sorkin
I am trying to run a repeated measures analysis of data in which each subject (identified by SS) has 3 observations at three different times (0, 3, and 6). There are two groups of subjects (identified by group). I want to know if the response differs in the two groups. I have tried to used lme.

Re: [R] function that converts data into a form that can be included in a question to mailing list

2016-08-24 Thread John Sorkin
Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) >>> Jim Lemon <drjimle...@gmail.com> 08/24/16 6:05 PM >>> Hi John, I think it is "dput". Jim On Thu, Au

[R] function that converts data into a form that can be included in a question to mailing list

2016-08-24 Thread John Sorkin
There is a function that can be used to convert data structures such as a data frame into a different format that allows the data to be sent to the mailing list. The structure that is created can be used to easily reconstruct the data structure. Unfortunately, I don't remember the function

[R] function for over dispersed poisson regression in the setting of a random effects model

2016-06-25 Thread John Sorkin
Is there a function that will run a model appropriate for over dispersed data (such as a negative binomial or quasipoisson) with a random effects (or mixed effects) model in R? GLMER will not accept: family=quasipoisson(link="log") or family=negbinomial(link="log") I want to run something

[R] Add column to the output of summary(glht).

2016-06-24 Thread John Sorkin
I am trying to make the leap from an R users to an R aficionado . . . I am trying to understand how add a column to the output of summary (and to understand how summary() works). I have run a glmer fit0 <- glmer(Fall ~ Group+(1|PID),family=poisson(link="log"),data=data[data[,"Group"]!=0,])

[R] Add column to the output of summary(glht).

2016-06-24 Thread John Sorkin
I am trying to make the leap from an R users to an R aficionado . . . I am trying to understand how add a column to the output of summary (and to understand how summary() works). I have run a glmer fit0 <- glmer(Fall ~ Group+(1|PID),family=poisson(link="log"),data=data[data[,"Group"]!=0,])

[R] meaning of lm( y~., data=mydat ), is it a language feature, is it documented, is it supported?

2016-05-23 Thread John Sorkin
The syntax mydat <- data.frame( y,x ) fit1 <- lm( y~., data=mydat ) appears to perform a multivariable regression of y on every non-y variable in the data frame mydat. I can not find this syntax (y~.) in R documentation. Is y~. a supported feature of the R language? Where can I find it

Re: [R] Antwort: Re: Re: sink(): Cannot open file

2016-05-10 Thread John Sorkin
George, I do not know what operating system you are working with, but when I use sink() under windows, I need to specify a valid path which I don't see in your code. I might, for example specify: sink("c:\myfile.txt") R code goes here sink() with the expectation that I would create a file

Re: [R] Trying to understand cut

2016-04-16 Thread John Sorkin
w...@dcn.davis.ca.us> 04/16/16 11:07 PM >>> Have you read FAQ 7.31 recently, John? Your whole premise is flawed. You should be thinking of ranges [0,10), [10,20), and so on because numbers ending in 0.9 are never going to be exact. -- Sent from my phone. Please excuse my brevity.

[R] Trying to understand cut

2016-04-16 Thread John Sorkin
I am trying to understand cut so I can divide a list of numbers into 10 group: 0-9.0 10-10.9 20-20.9 30-30.9, 40-40.9, 50-50.9 60-60.9 70-70.9 80-80.9 90-90.9 As I try to do this, I have been playing with the cut function. Surprising the following for applications of cut give me the exact

[R] Microsoft R Server

2016-04-14 Thread John Sorkin
Has anyone ever heard of or used Microsoft R server? Does the product work? What are requirements for running it? How much does it cost and is it supported by the R community? Thank you, John Confidentiality Statement: This email message, including any attachments, is for th...{{dropped:6}}

[R] Using a function with apply Error: undefined columns selected

2016-04-07 Thread John Sorkin
I am trying to write a function that can be used to apply to process all the columns of a data.frame. If you will run the code below, you will get the error message undefined columns selected. I hope someone will be able to teach me what I am doing wrong. Thank you, John # create data frame.

[R] using apply to a data frame

2016-04-07 Thread John Sorkin
‪‪I would like to apply a function, fract, to the columns of a dataframe. I tried the following apply(data5NonEventEpochs,2,fract) but, no surprise it did not work as apply works on matrices not data frames. How can I apply a fuction to the columns of a data frame? (I can't covert

[R] Specifying path to a windows server

2016-04-05 Thread John Sorkin
Windows 7 (local computer) Windows server (server I am trying to reach) I need to read a file whose windows path is of the form \\Theserver\mydirectory\data.csv You will note that as per windows standards the server name is preceded by two backslashes. I am not sure how to specify this in

[R] p values from GLM

2016-04-01 Thread John Sorkin
How can I get the p values from a glm ? I want to get the p values so I can add them to a custom report fitwean<- glm(data[,"JWean"]~data[,"Group"],data=data,family=binomial(link ="logit")) summary(fitwean) # This lists the coefficeints, SEs, z and p values, but I can't

Re: [R] Calculate negative log of the E-Values in R

2016-02-26 Thread John Sorkin
Actually E is not "just a computer way of saying 0". The E represents a power of 10, thus E-1 = 0.1 e-2=0.01; E therefore is not zero. Because computers generally can not perform exact calculations (for reasons including the fact that our number system is base 10 and a computer's is generally

[R] normalmixEM gives widely divergent results.

2016-01-27 Thread John Sorkin
I am running normalmixEM: mixmdlscaled <- normalmixEM(data$FCWg) summary(mixmdlscaled) plot(mixmdlscaled,which=2) If I run the program multiple times, I get widely different results: > mixmdlscaled <- normalmixEM(data$FCWg) number of iterations= 41 > summary(mixmdlscaled) summary of

Re: [R] R-help mailing list activity / R-not-help?

2016-01-25 Thread John Sorkin
When we read acerbic replies we should remind the poster to reply in a more moderate tone. On the other hand noting that the list is not intended to be a source of answers to home work questions is 100% appropriate. This philosophy is intended both to keep the list from being flooded with

Re: [R] R-help mailing list activity / R-not-help?

2016-01-25 Thread John Sorkin
I submit it is up to list members to maintain civility. If we politely point out. off-line, to people who post questionable posts what they are doing, I am sure their behavior will quickly change.John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics

[R] Trying to use name of difference variable created in a function in call to wilcox.test function.

2016-01-12 Thread John Sorkin
I am trying to write a function which will allow me to analyze many variables all of which have the same form, Base.stem and Disch.stem, where stem varies from variable to variable, e.g. Base.rolling and Disch.rolling, Base.standing, Disch.standing. I want to pass a dataframe and the stem of

[R] error using by(goop[, c("a", "b", "c")], goop[, "Arm"], mySD) was Re: by gives no results, gives warning that data are non-numeric, but the data appears to be numeric.

2015-12-28 Thread John Sorkin
I am trying to use the by function to get the SD of each column of a data frame, stratified by ARM. Using a suggestion provided by both William Dunlap and Rolf Turner, I have written the code below which fails with the error: Error in match.fun(FUN) : 'sqrt(var(x))' is not a function,

Re: [R] by gives no results, gives warning that data are non-numeric, but the data appears to be numeric.

2015-12-28 Thread John Sorkin
86 Bill Dunlap TIBCO Software wdunlap tibco.com On Sun, Dec 27, 2015 at 6:55 PM, John Sorkin <jsor...@grecc.umaryland.edu> wrote: When I run by, I get an error message and no results. Any help in understanding what is wrong would be appreciated. Error message: Warning messages:

[R] by gives no results, gives warning that data are non-numeric, but the data appears to be numeric.

2015-12-27 Thread John Sorkin
When I run by, I get an error message and no results. Any help in understanding what is wrong would be appreciated. Error message: Warning messages: 1: In mean.default(data[x, , drop = FALSE], ...) : argument is not numeric or logical: returning NA 2: In mean.default(data[x, , drop = FALSE],

Re: [R] by gives no results, gives warning that data are non-numeric, but the data appears to be numeric.

2015-12-27 Thread John Sorkin
e use dput() to present your data; it makes life a lot > easier for respondents. > > cheers, > > Rolf > > -- > Technical Editor ANZJS > Department of Statistics > University of Auckland > Phone: +64-9-373-7599 ext. 88276 > >> On 28/12/15 15:55, John Sor

Re: [R] R studio installation and running

2015-12-23 Thread John Sorkin
If you want to run Rstudio locally, install the desktop edition. If you want to be able to run Rstudio from a remote machine which will connect to your desktop via the web, install the server edition. If you are unsure which to use, or are having trouble, start with the desktop edition. You

Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-15 Thread John Sorkin
On this side of the Atlantic, the symbols ( or ) are properly called parenthesis not brackets. Consider the expression parenthetical expression, which means something enclosed in parentheses. John > John David Sorkin M.D., Ph.D. > Professor of Medicine > Chief, Biostatistics and Informatics >

Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-15 Thread John Sorkin
VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) >>> Berend Hasselman <b...@xs4all.nl> 12/15/15 12:59 PM >>> > On 15 Dec 2015,

[R] Function calling a function, column name not passed properly

2015-12-01 Thread John Sorkin
I am trying to write a function that calls a function. The first call to SmallFn works without any problem, printing both the passed data and the column Wstscr. The second call does not work (error, Error in d[, column] : subscript out of bounds). The first call shows what I am trying to do

[R] Function calling a function, column name not passed properly

2015-12-01 Thread John Sorkin
] [ thread ] [ subject ] [ author ] > On Dec 1, 2015, at 2:57 PM, John Sorkin wrote:> > I am trying to write a function that calls a function. The first call to SmallFn works without any problem, printing both the passed data and the column Wstscr. The second call does not work (error, E

[R] What URL do I go to manage my subscription to the list? Please respond directly to me, not to this list!!!!

2015-12-01 Thread John Sorkin
John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119

[R] What URL do I go to manage my subscription to the r-help? Please respond directly to me, not to this list!!!!

2015-12-01 Thread John Sorkin
Please respond directly to me jsor...@grecc.umaryland.edu. If you respond to the list I will not get your response. There is a problem with my subscription. It has been changed to digest. I need to set it back to no digest (i.e. get messages as soon as they are posted) John John David Sorkin

[R] SWEAVE - a gentle introduction

2015-11-17 Thread John Sorkin
I am looking for a gentle introduction to SWEAVE, and would appreciate recommendations. I have an R program that I want to run and have the output and plots in one document. I believe this can be accomplished with SWEAVE. Unfortunately I don't know HTML, but am willing to learn. . . as I said

[R] Add sequence numbers to lines with the same ID: How can this be accomplished?

2015-10-24 Thread John Sorkin
I have a file that has (1) Line numbers, (2) IDs. A given ID number can appear in more than one row. For each row with a repeated ID, I want to add a number that gives the sequence number of the repeated ID number. The R code below demonstrates what I want to have, without any attempt to

Re: [R] [FORGED] Re: How to correct documentation?

2015-10-24 Thread John Sorkin
Bert Talking about Loglan and problems with the imprecise nature of English, which sense of sanction do you mean to authorize, approve, or allow: an expression now sanctioned by educated usage. to ratify or confirm: to sanction a law. to impose a sanction on; penalize, especially by way of

[R] writing a function that will refer to the elements of a dataframe much as is done by lm

2015-10-12 Thread John Sorkin
I am trying to learn how to write R functions (really to program in R). I want to write a function that will allow me to refer to the elements of a data frame by column name, much as is done in lm. I can't seem to get the syntax correct. I want the function to print the elements of

Re: [R] Comparing two populations based on the percentile values calculated from two independent samples

2015-09-24 Thread John Sorkin
Mohamed, You probably should seek the help of a local statistician, and should read about Pearson's chi square test and Fisher's exact test. John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of

Re: [R] Compare two normal to one normal

2015-09-22 Thread John Sorkin
.edu> 09/22/15 6:23 PM >>> On Tue, 22 Sep 2015, John Sorkin wrote: > > In any event, I still don't know how to fit a single normal distribution > and get a measure of fit e.g. log likelihood. > Gotta love R: > y <- rnorm(10) > logLik(glm(y~1)) 'log Lik.' -17.3

Re: [R] Compare two normal to one normal

2015-09-22 Thread John Sorkin
ntical parameters for both normals). Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Tue, Sep 22, 2015 at 1:21 PM, John Sorkin <jsor...@grecc.umaryland.edu> wrote: > I have data tha

[R] Compare two normal to one normal

2015-09-22 Thread John Sorkin
I have data that may be the mixture of two normal distributions (one contained within the other) vs. a single normal. I used normalmixEM to get estimates of parameters assuming two normals: GLUT <- scale(na.omit(data[,"FCW_glut"])) GLUT mixmdl = normalmixEM(GLUT,k=1,arbmean=TRUE)

Re: [R] Compare two normal to one normal

2015-09-22 Thread John Sorkin
of the former (with identical parameters for both normals). Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Tue, Sep 22, 2015 at 1:21 PM, John Sorkin <jsor...@grecc.um

Re: [R] Compare two normal to one normal

2015-09-22 Thread John Sorkin
er fit than one, as the latter >> must be a subset of the former (with identical parameters for both >> normals). >> >> Cheers, >> Bert >> >> >> Bert Gunter >> >> "Data is not information. Information is not knowledge. And knowledge &

[R] getting means by group within time point for data on multiple lines (long rather than wide file)

2015-09-17 Thread John Sorkin
I have a long (rather than wide file), i.e. the data for each subject is on multiple lines rather than one line. Each line has the following layout: subject group time value I have two groups, multiple subjects, each subject can be seen up to three times a time 0, and at most once at times 4 and

[R] finding those elements of listA that are found in listB

2015-09-16 Thread John Sorkin
I have two structures. I think they are lists, but I am not sure. Both structures contain integers. I am trying to find those members of list b that are found in list a. I have tried to perform the search using grep, but I get an error. Please see code below. I would appreciate knowing how to

[R] Simulate skewed data if 2.5, 25th 50th and 75 centile are known

2015-08-05 Thread John Sorkin
Colleagues, I need to simulate skewed data so I can run a sample size calculation. I know the 2.5th, 25th, 50th, and 75th centiles of the data (32, 43, 48, 250). data - matrix(c(75,250,50,48,25,43,2.5,32),nrow=4,ncol=2,byrow=TRUE) dimnames(data) - list(NULL,c(x,y)) data Is there a way I can

[R] degrees of freedom (and hence p values) from lme and lmer don't agree . . . Why?????????

2015-07-07 Thread John Sorkin
I am trying to fit data from 23 subjects using random effects regression, and am comparing the results of lme and lmer. The point estimates and the SEs are the same in both models, however the degrees of freedom are widely different. lme reports 88 DF, lmer approximately 22. Can someone help me

[R] Greek letters in column titles.

2015-07-05 Thread John Sorkin
I would like to include a Greek letter in a column title, viz. pB where B should be the Greek letter beta, but I don't know how to do this. I know about dimnames, but I don't know how to create the Greek letter. Thank you, John John David Sorkin M.D., Ph.D. Professor of Medicine Chief,

Re: [R] Greek letters in column titles.

2015-07-05 Thread John Sorkin
. Perhaps you need to give some more details about what exactly the problem is. Best, Ista On Jul 5, 2015 3:36 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: I would like to include a Greek letter in a column title, viz. pB where B should be the Greek letter beta, but I don't know how

[R] mixtools? Fitting two-normal distributions to data where one of the two normal distributions (the one corresponding to lower values of x) is a left-truncated normal distribution.

2015-06-30 Thread John Sorkin
I am trying to model the mixture of two normal distributions, where x values are in the range of zero to some positive value. I know about mixtools and would use it save for the fact that the the y values from the normal distribution corresponding to the lower values of x (i.e. from zero to

Re: [R] Blank spaces are replaced by period in read.csv, I want to replace blacks with an underline

2015-06-08 Thread John Sorkin
- David L Carlson Department of Anthropology Texas AM University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of John Sorkin Sent: Monday, June 8, 2015 9:16 AM Cc: r-help@r-project.org Subject: [R] Blank spaces

[R] Blank spaces are replaced by period in read.csv, I want to replace blacks with an underline

2015-06-08 Thread John Sorkin
I am reading a csv file. The column headers have spaces in them. The spaces are replaced by a period. I want to replace the space by another character (e.g. the underline) rather than the period. Can someone tell me how to accomplish this?Thank you, John John David Sorkin M.D., Ph.D. Professor

Re: [R] Blank spaces are replaced by period in read.csv, I want to replace blacks with an underline

2015-06-08 Thread John Sorkin
the discussion. On Mon, Jun 8, 2015 at 10:49 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: Sarah, I am not sure how I use check.names to replace every space in the names of my variables with an underline. Can you show me how to do this? My current code is as follows: check.names just

[R] Finite mixture model: truncated normal and a normal distribution

2015-06-04 Thread John Sorkin
I am looking for software that will take data what appears to come from a series of low numbers coming from a left-truncated normal distribution and a series of higher numbers coming from a normal distribution and produce the mean, SD, and mixing proportion of the two source distributions. I

Re: [R] [R-sig-ME] different results from lme and lmer function

2015-05-26 Thread John Sorkin
Ben, I doubt the very small difference in log likelihood gives much, if any information about which model is a better fit. Even if we overlook the limited precision of the estimate of the REML criterion, the difference is so small as to me of minimal importance. John John David Sorkin M.D.,

Re: [R] Heatmap

2015-04-28 Thread John Sorkin
Look at the heatmap function John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore,

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] error using by, Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default

2015-04-20 Thread John Sorkin
I am receiving an error message from the by function that I don't understand: Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default My code follows: summary(ipd) group valuestime subjects weaned disp

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] error using by, Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default

2015-04-20 Thread John Sorkin
I am receiving an error message from the by function that I don't understand: Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default My code follows: summary(ipd) group valuestime subjects weaned disp

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-19 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] library(xlsx) fails with an error: Error: package ‘rJava’ could not be loaded

2015-04-18 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am having difficulty loading and installing the xlsx package. The loading occurred without any problem, however the library command library(xlsx) produced an error related to rJava. I tried to install rJava seperately, re-loaded the xlsx package, and

Re: [R] Running R Remotely on LINUX

2015-04-14 Thread John Sorkin
I suggest that you investigate installing RStudio server on the Linux Box. If you do this, you can logon to RStudio (on the Linux server), and it will look exactly like RStudio running on a windows box. You may need some help configuring the Linux box to allow access to port 8787, which is the

[R] Trying to understand a function passed to lapply

2015-03-30 Thread John Sorkin
Colleagues, I am trying to understand the syntax of a function passed to apply. The code below generates a matrix, and passes the matrix to a function that is called by apply. I don't understand the syntax of the function. In some way the function computes data[,delta]/data[,SE]. I can't

Re: [R] multiple imputation of longitudinal, time-unstructured data

2015-02-17 Thread John Sorkin
Pam, Please let me know what you discover. I just started looking at a similar problem. I understand that a Kalman filter can sometimes be applied to this problem, but at this time I don't know how to accomplish this. John John David Sorkin M.D., Ph.D. Professor of Medicine Chief,

[R] lme: Can not find groupData object in a function could this be a scoping problem?

2015-02-13 Thread John Sorkin
I resolved my program by restating RStudio . . . Thanks you, John R 3.1.0, RStudio 0.98.95 Windows 7 I have written a function that uses lme: doit- function(TS,rho,premean,presd,RxEffect) { . . . # Prepare data frames for regression analyses. data -

[R] lme: Can not find groupData object in a function could this be a scoping problem?

2015-02-13 Thread John Sorkin
R 3.1.0, RStudio 0.98.95 Windows 7 I have written a function that uses lme: doit- function(TS,rho,premean,presd,RxEffect) { . . . # Prepare data frames for regression analyses. data - data.frame(group=c(rep(Cont,SS),rep(Exp,SS)), pre=pre,post=post) . . .

[R] Installing RStudio

2015-02-12 Thread John Sorkin
Windows 7, 64-bit. I am trying to install RStudio. Before installing RStudio, I installed R 3.1.2. During the installation or R, I installled (as per the default) 32- and 64-bit packages. When I tried to install RStudio, I received the message R does not appear to be installed. Please install

[R] Impute time-series data, perhaps with a Kalman filter - do you know of any R code?

2015-02-11 Thread John Sorkin
Does anyone have code that uses a Kalman filter to impute time-series data? If not, do you know of any software that can be used to impute time-series data? Thank you, John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of

[R] aov and Error function

2015-01-31 Thread John Sorkin
I am trying to understand the Error function and its use in ANOVA. In particular I want to understand the difference between two models that differ only with respect to the Error statement: aovsubj- aov(value~group+time+Error(subject),data=dataRMANOVA) and

[R] repeated measures ANOVA

2015-01-30 Thread John Sorkin
Windows 7, R 3.1.0 How does one run repeated measures ANOVA using R for (1) A balanced design (2) An unbalanced design. so that one will get an ANOVA table? I have seen references to the Anova function in the car package, but this seems to have been deprecated. Thank you, John John David

[R] RStudio connection to server: Safari cannot open page because it could not connect to the server

2015-01-15 Thread John Sorkin
I set up Rstudio, and can access it from within my lan using http:/192.168.108:8787. I looked up my external IP address using one of the websites that returns an ip addresses and tried to connect from outside my LAN using http://73.213.144.65:8787 and received a message: Safari cannot open the

[R] Install R on linux Mint

2015-01-14 Thread John Sorkin
I am trying to install R on Linux mint 17.1. I followed the instructions found on CRAN and got a messages about unmet dependencies. I detail below the steps I took: I added deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu utopic/ to /etc/apt/sources.list As can be seen below:

Re: [R] R vs. RStudio?

2015-01-10 Thread John Sorkin
I urge you to try it. John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD

Re: [R] Getting column names in the titles of histograms generated automatically

2015-01-07 Thread John Sorkin
(histogram of, i)) On Wed, Jan 7, 2015 at 10:13 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: I am trying to automatically produce a series of histograms from every column of data frame with many columns. The columns names of a shortened from of the data frame follow: colnames-names

[R] Getting column names in the titles of histograms generated automatically

2015-01-07 Thread John Sorkin
I am trying to automatically produce a series of histograms from every column of data frame with many columns. The columns names of a shortened from of the data frame follow: colnames-names(smdata) colnames [1] X13594_pre X15568_pre I want to have X13594_pre in the title of the first

[R] Saving an edited R function - RStudio and R

2014-12-31 Thread John Sorkin
Windows 7 Colleagues, I used the fix() function to edit an existing function when using RStudio. After editing the function, I am given the option to SAVE the modified function. I would like to know (1) where the modified function is stored (the save button does not have an option to specify

[R] Can not save files

2014-12-31 Thread John Sorkin
When I try to save a file, I get Permission denied. Can someone let me know why this happens? I am running under Windows 7, Rstudio save(TheResults,file=c:\\data) Error in gzfile(file, wb) : cannot open the connection In addition: Warning message: In gzfile(file, wb) : cannot open

Re: [R] Can not save files

2014-12-31 Thread John Sorkin
Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) David Winsemius dwinsem...@comcast.net 12/31/14 8:52 PM On Dec 31, 2014, at 3:29 PM, John Sorkin wrote: When I try to save

[R] normalmixEM does not produce the same results when run twice using the same data.

2014-12-31 Thread John Sorkin
Windows 7 I am running normalmixEM to fit two normal curves to my data. For some reason, that I don't understand, the results of running the function twice, on the same data, results in two different (although similar) sets of values. I would expect the function run twice on the same data

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-12-01 Thread John Sorkin
Can the Gods of the mailing list please end this long email thread? All that needs to be done is to add an unsubscribe link to messages sent by the server. If this is technically feasible, please do it. If it is not let us know so we can get on to other issues! John John David Sorkin M.D.,

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-11-30 Thread John Sorkin
Sorkin wrote: I don't see a link that is labeled unsubscribe. SNIP On Nov 29, 2014, at 7:35 PM, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: In what way would that be unlike the link that is already there? SNIP On November 29, 2014 4:09:29 PM PST, John Sorkin jsor

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-11-29 Thread John Sorkin
Requests like this appear from time to time. Would it make sense to add a link to the bottom of the email messages generated by the mail program that is labeled and goes directly to the unsubscribe page? John On Nov 29, 2014, at 8:26 AM, M. A. Parreñomap...@gmail.com map...@gmail.com wrote:

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-11-29 Thread John Sorkin
/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. On November 29, 2014 4:09:29 PM PST, John Sorkin

[R] Defining vectors with per-determined correlations

2014-09-04 Thread John Sorkin
I need to define three vectors x, y, z (each of length 100) such that the pair-wise correlations of the vectors have per-defined values r1 and r2. More specifically I need to define x, y, and z so that: corr(x,y) = r1 corr(y,z) = r2 Is there any easy way to accomplish this with R? Thank

Re: [R] Cargar csv 16 GB en R

2014-06-01 Thread John Sorkin
Laura, Si pudes escribir en Engles, vas a recibir mas ayuda; el mejor parte de personas (incluendo yo) no podemos hablar Espanol. Has tratado usando su programa con un parte pequeno de su dato? Si haces esto todavia tienes su problema? Puedes enviarnos un copia de su programa, y un subset (por

[R] Spline regression (or any localized regression) in the setting of a random effects model.

2014-04-21 Thread John Sorkin
Colleagues, Is there any R program that will allow me to run a localized regression (e.g. smoothing spline) in the context of a random effects model? I have data on the growth of animals and want to create growth curves. I am not certain what shape the growth curve would take, so I would like

  1   2   3   4   >