我有一个具有不同日期格式的日期集(例如,2014年11月24日和7月7日 - 14日)
我试过as.Date(thd$SubmitDate, "%B. %d, %Y")
,但似乎这还不够。
答案 0 :(得分:8)
尝试
$ /opt/perl5_64/bin/perl Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Mouse' version 'v2.4.2'
cp META.json MYMETA.json
cp META.yml MYMETA.yml
$
$ ./Build
UNIVERSAL->import is deprecated and will be removed in a future perl at /opt/perl5_64/lib/5.14.2/File/Compare.pm line 8
Building Mouse
Generate Mouse::Tiny ...
done.
xs-src/MouseAccessor.xs => xs-src/MouseAccessor.c
xs-src/MouseAttribute.xs => xs-src/MouseAttribute.c
xs-src/MouseTypeConstraints.xs => xs-src/MouseTypeConstraints.c
xs-src/MouseUtil.xs => xs-src/MouseUtil.c
gcc -maix64 -maix64 -I. -Ixs-src -I/opt/perl5_64/lib/5.14.2/aix-thread-multi- 64all/CORE -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_THREAD_SAFE -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -fno-strict-aliasing -pipe -maix64 -DUSE_64_BIT_ALL -O -o xs-src/MouseAccessor.o xs-src/MouseAccessor.c
xs-src/MouseAccessor.xs: In function 'mouse_attr_set':
xs-src/MouseAccessor.xs:212: warning: 'old_value' may be used uninitialized in this function
gcc -maix64 -maix64 -I. -Ixs-src -I/opt/perl5_64/lib/5.14.2/aix-thread-multi-64all/CORE -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_THREAD_SAFE -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -fno-strict-aliasing -pipe -maix64 -DUSE_64_BIT_ALL -O -o xs-src/MouseAttribute.o xs-src/MouseAttribute.c
gcc -maix64 -maix64 -I. -Ixs-src -I/opt/perl5_64/lib/5.14.2/aix-thread-multi-64all/CORE -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_THREAD_SAFE -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -fno-strict-aliasing -pipe -maix64 -DUSE_64_BIT_ALL -O -o xs-src/MouseTypeConstraints.o xs-src/MouseTypeConstraints.c
gcc -maix64 -maix64 -I. -Ixs-src -I/opt/perl5_64/lib/5.14.2/aix-thread-multi-64all/CORE -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -D_THREAD_SAFE -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -fno-strict-aliasing -pipe -maix64 -DUSE_64_BIT_ALL -O -o xs-src/MouseUtil.o xs-src/MouseUtil.c
xs-src/MouseTypeConstraints.xs: In function 'boot_Mouse__Util':
xs-src/MouseTypeConstraints.xs:616: warning: implicit declaration of function 'setup_my_cxt'
xs-src/MouseTypeConstraints.xs:619: warning: implicit declaration of function 'DEFINE_TC'
xs-src/MouseTypeConstraints.xs:619: error: 'Any' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:619: error: (Each undeclared identifier is reported only once
xs-src/MouseTypeConstraints.xs:619: error: for each function it appears in.)
xs-src/MouseTypeConstraints.xs:620: error: 'Undef' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:621: error: 'Defined' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:622: error: 'Bool' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:623: error: 'Value' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:624: error: 'Ref' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:625: error: 'Str' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:626: error: 'Num' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:627: error: 'Int' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:628: error: 'ScalarRef' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:629: error: 'ArrayRef' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:630: error: 'HashRef' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:631: error: 'CodeRef' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:632: error: 'GlobRef' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:633: error: 'FileHandle' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:634: error: 'RegexpRef' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:635: error: 'Object' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:636: error: 'ClassName' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:637: error: 'RoleName' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:702: error: 'MTC_CLASS' undeclared (first use in this function)
xs-src/MouseTypeConstraints.xs:702: error: expected ')' before string constant
xs-src/MouseTypeConstraints.xs:702: error: too few arguments to function 'Perl_newXS'
xs-src/MouseTypeConstraints.xs:706: error: expected ')' before string constant
xs-src/MouseTypeConstraints.xs:706: error: too few arguments to function 'Perl_get_sv'
xs-src/MouseTypeConstraints.xs:713: error: expected ')' before string constant
xs-src/MouseTypeConstraints.xs:713: error: too few arguments to function 'Perl_get_cv'
xs-src/MouseTypeConstraints.xs:715: error: expected ')' before 'MTC_CLASS'
xs-src/MouseTypeConstraints.xs:715: error: expected ')' before string constant
xs-src/MouseTypeConstraints.xs:722: error: expected ')' before string constant
xs-src/MouseTypeConstraints.xs:722: error: too few arguments to function 'Perl_get_cv'
xs-src/MouseTypeConstraints.xs:724: error: expected ')' before 'MTC_CLASS'
xs-src/MouseTypeConstraints.xs:724: error: expected ')' before string constant
xs-src/MouseTypeConstraints.xs:731: error: expected ')' before string constant
xs-src/MouseTypeConstraints.xs:731: error: too few arguments to function 'Perl_get_cv'
xs-src/MouseTypeConstraints.xs:733: error: expected ')' before 'MTC_CLASS'
xs-src/MouseTypeConstraints.xs:733: error: expected ')' before string constant
error building xs-src/MouseUtil.o from 'xs-src/MouseUtil.c' at /opt/perl5_64/lib/5.14.2/ExtUtils/CBuilder/Base.pm line 175, <DATA> line 1.
library(lubridate)
parse_date_time(v1, guess_formats(v1, c('mdY', 'dmy')))
#[1] "2014-11-24 UTC" "2014-07-07 UTC"