Displaying 20 results from an estimated 30000 matches similar to: "How to prevent fix() from converting Dates into numeric"
2007 Mar 12
4
meta-regression, MiMa function, and R-squared
Dear Wolfgang Viechtbauer and list members:
I have discovered your "MiMa" function for fitting meta-analytic
mixed-effects models through an earlier discussion on this list. I think
it is extremely useful and fills an important gap. In particular, since
it is programmed so transparently, it is easy to adapt it for one's own
needs. (For example, I have found it easy to identify
2006 Oct 29
1
glmmPQL in 2.3.1
I have come across the previous communication on this list in September
(copied below) because I had received the same error message.
I understand from Brian Ripley's reply that anova should not be used
with glmmPQL because it is not an adequate method, and that this is now
shown with an error message.
My question is, what method *should* be used? Using summary does not
give me the result
2009 Jun 23
4
Apply as.factor (or as.numeric etc) to multiple columns
Hi R-helpers,
I have a dataframe with 60columns and I would like to convert several
columns to factor, others to numeric, and yet others to dates. Rather
than having 60 lines like this:
data$Var1<-as.factor(data$Var1)
I wonder if it's possible to write one line of code (per data type,
e.g. factor) that would apply a function (e.g., as.factor) to several
(non-contiguous) columns. So, I
2012 Oct 25
1
cut point in ROC
var1
var2
var3
var4
var5
var6
var7
var8
var9
var10
gold
2
3
1
2
4
0
1
4
4
3
2
2
4
2
4
3
4
2
4
4
4
2
3
3
0
0
4
1
0
2
4
4
2
1
4
0
3
2
0
0
2
4
4
2
3
4
0
2
2
0
0
0
3
4
2
2
2
3
2
2
0
0
0
2
4
2
2
4
1
1
2
0
0
3
3
3
2
3
4
1
4
0
0
0
0
3
4
2
3
1
0
2
2
1
0
2
3
3
2
0
3
1
1
1
1
2
1
2
3
2
1
2016 Jul 18
2
Pregunta sobre boxplots
Colegas:
Tengo una pregunta rara, y ofrezco mis disculpas si es una tonteria.
Estoy tratando de hacer unos graficos con datos recolectados cada 24
horas, con varias replicas por cada periodo de tiempo. La mejor
representacion que he encontrado es hacer boxplots haciendo el tiempo una
variable categorica. Sin embargo, me gustaria tener una linea de regresion,
o ajuste usando splines o LOESS a
2010 Apr 12
2
Interpreting factor*numeric interaction coefficients
Dear all,
I am a relative novice with R, so please forgive any terrible errors...
I am working with a GLM that describes a response variable as a function of
a categorical variable with three levels and a continuous variable. These
two predictor variables are believed to interact.
An example of such a model follows at the bottom of this message, but here
is a section of its summary table:
2009 Sep 22
3
converting a character vector to a function's input
Hi all, I have been trying to solve this problem and have had no luck so far.
I have numeric vectors VAR1, VAR2, and VAR3 which I am trying to cbind. I also have a character vector "VAR1,VAR2,VAR3". How do I manipulate this character vector such that I can input a transformed version of the character vector into cbind and have it recognize that I'm trying to refer to my numeric
2009 Jan 24
2
how to prevent duplications of data within a loop
Hi All,
I had posted a question on a similar topic, but I think it was not
focused. I am posting a modification that I think better accomplishes
this.
I hope this is ok, and I apologize if it is not. :)
I am looping through variables and running several regressions. I have
reason to believe that the data is being duplicated because I have
been
monitoring the memory use on unix.
How can I avoid
2010 Oct 27
1
"non-numeric argument to binary operator" error while reading ncdf file
Hi everyone,
I am a newbie in R and in this discussion list. I am trying to use R package
"ncdf" to read values of temperature from a NCDF file. I did it before to
another file using the function "get.var.ncdf", but now there is an error
that I can not solve, and I would really appreciate if you could help me.
I am using R version 2.11.1 (2010-05-31) in a machine with Linux
2003 Jul 16
4
how to handle missing values
This group impresses me, so far I have been helped with all my questions
within 24 hours. Thanks.
Therefore another one.
I am used to programs (such as STATA) where observations with missing values
that are included in a model are simply ignored in the analysis. So far I
have not been able to figure out how to deal with missing values in R and
have solved the problem by deleting observations
2011 Jan 05
4
Match numeric vector against rows in a matrix?
Two posts in one day is not a good day...and this question seems like it should have an obvious answer:
I have a matrix where rows are unique combinations of 1's and 0's:
> combs=as.matrix(expand.grid(c(0,1),c(0,1)))
> combs
Var1 Var2
[1,] 0 0
[2,] 1 0
[3,] 0 1
[4,] 1 1
I want a single function that will give the row index containing an exact match
2009 Jan 26
1
Error in Surv(time, status) : Time variable is not numeric
Dear,
I want to analyze two-level survival data using a shared frailty model, for
which I want to use the R package 'Frailtypack", proposed by Rondeau et al.
The dataset was built using SAS software. I also tried to change the format
using SPSS and Excell.
My (reduced) dataset has following column names:
ID entry time status family var1
I used following command:
>
2020 Jun 11
2
FileCheck: using numeric variable defined on same line with caveats
Hi,
TL;DR: Is it ok to allow numeric variables used on same line as defined except for CHECK-NOT and with false negatives?
FileCheck does not currently allow a numeric variable from being used on the same line they were defined. I have a tentative patch to add that support but it comes with caveats so before going through review I'd like to get consensus on whether those caveats are
2003 Sep 12
2
Converting character to function argument
How can one transform a character string into an argument of a function
(which is not or I don't want it to be a character string)?
Example:
> expand.grid(c(1,0),c(1,0)) ## OK
Var1 Var2
1 1 1
2 0 1
3 1 0
4 0 0
> paste(rep("c(0,1)",2),collapse=',') ## to be used below
[1] "c(0,1),c(0,1)"
> ## string is the input I want, but it
2006 Nov 23
2
converting from numeric to Date
Hi all,
I have a Date, that has been converted to a number that represent the
count of seconds since year 1970, how do i convert it to a date ?
Example :
>Limite_x<-c(1131408000,1163548800)
>is(limite_x)
[1] "numeric" "vector"
But these numbers are dates, did R provide something that give you the
date from this numeric vector ?
Thks all.
COMTE
2005 Nov 29
1
Indexing variables within lapply?
Hello
I am using R 2.2.0 with Windows XP.
I've got a five element list object, each element containing two
dataframes of equivalent size.
> str(mylist)
List of 1
$ data1:List of 2
..$ data1a :`data.frame': 77 obs. of 63 variables:
.. ..$ var1 : num [1:77] 0.41375 0.00056 1.43040 1.43528 0.61730 ...
.. ..$ var2 : num [1:77] 1.154 1.686 0.673 0.800 0.760 ...
..
2011 Jun 24
1
Converting an ftable (contingency table) to a dataframe in R
I am generating an ftable (by running ftable on the results of a xtabs command) and I am getting the following.
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Var1? Var2
date ? ? ? ? ? ? ? ? group? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
2007-01-01? ? ? ? ? q1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1? ? 9
? ? ? ? ? ? ? ? ? ? ?q2 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
2004 Dec 02
3
net ads join fails - "Preauthetication failed"
After a lot of different problems and variations of krb5.conf and
samba.conf files I am currently stuck with the following error trying to
join a domain
net ads join -U nfybw@UIB.NO 'Klienter\IT\MatNat\IFT\Samba
Servers\IT-gruppen'
nfybw@UIB.NO's password:
[2004/12/02 15:34:36, 0] libads/ldap.c:ads_add_machine_acct(1367)
ads_add_machine_acct: Host account for iftsmb100 already
2011 Oct 05
2
any way to convert back to DateTime class when "accidental" conversion to numeric?
Hi,
In short, I would like to know if there is any way to convert a numeric
into a date, similar to how strptime() can convert a string to a date time
class?
There are some functions, etc. which don't work well with dates, and
tend to force them into numerics. I understand that the number it spits
back is the number of seconds since the beginning of 1970 (see the first few
sentences
2004 Feb 02
3
sorting by date
Hello,
I have set up a data.frame and one of the columns contains a date of the
form (with slashes as separators):
mm/dd/yyyy
I would like to use formulas on other columns in the data.frame organized
by date, for example:
tapply(var1, sort(date), mean)
However, when I try sort(date) it sorts based on the first two entries in
the date field:
9/1/2001 9/1/2002 9/1/2003 9/2/2001 ...
5.6 7.5