Displaying 20 results from an estimated 2000 matches similar to: "Best way to do temporal joins in R?"
2011 Apr 05
2
IFELSE function XXXX
Hello everyone,
This IFELSE function call is not working properly. I do not receive an error
message, but the actions are not executed conditional as I was hoping. Any
assistance is appreciated.
set.seed(12345)
res1<-rbinom(10000,1,.1)
rdata3<-transform(data.frame(res1),input1=rnorm(10000,50,10))
data3
#inducing correlation between res1 & input1
2009 Nov 12
2
redundant factor levels after subsetting a dataset
#I have a data frame with a numeric and a character variable.
x=c(1,2,3,2,0,2,-1,-2,-4)
md=c(rep("Miller",3), rep("Richard",3),rep("Smith",3))
data1=data.frame(x,md)
#I subset this data.frame in a way such that one level of the character
variable does not appear in the new dataset.
data2=data1[x>0,]
data3=subset(data1,x>0)
#However, when I check the levels
2008 May 14
4
Accessing items in a list of lists
Using R 2.6.2, say I have the following list of lists, "comb":
data1 <- list(a = 1, b = 2, c = 3)
data2 <- list(a = 4, b = 5, c = 6)
data3 <- list(a = 3, b = 6, c = 9)
comb <- list(data1 = data1, data2 = data2, data3 = data3)
So that all names for the lowest level list are common. How can I most
efficiently access all of the sublist items "a" indexed by the outer
2008 Jan 15
1
how to fit model to split data and get residual plots
I have a data set with the following structure (with many more obs.):
var1 expt day diameter
1 1 2 0.5
1 1 3 0.9
1 1 4 1.3
1 1 5 1.7
1 2 2 0.3
1 2 3 0.5
1 2 4 0.9
1 2 5 1.6
2 1 2 0.7
2 1 3 1.2
2 1 4 1.6
2 1 5 2.3
2 2 2 0.4
2 2 3 0.8
2 2 4 1.6
2 2 5 3.2
I can get separate regression analysis for each level of var1 and expt
with the command:
by(data3, data3$var1:data3$expt, function(x)
2002 Dec 05
1
Passing options as lists
Hi,
I apologize if this has previously been posted. I've just subscribed to the
R-help digest.
I'm writing a plotting function that uses layout() to plot several different
plots on the same device. This function uses plot(), image(), and a custom
function that uses text(). Each cell of the layout needs different par()
parameters, so what I'd like to do is pass them as lists:
2009 Jun 03
1
Still can't find missing data - How do I get NA in xtabs with factors?
The problem here is Table doesn't seem to have a way to weigh the data.
> ToyData
Data1 Data2 Data3 Weight
101 Sam Red Banana 1.1
102 Sam Green Banana 2.1
103 Sam Blue Orange 2.1
104 Fred Red Orange 2.1
105 Fred Green Guava 2.1
106 Fred Blue Guava 2.1
107 <NA> Red Pear 50.1
108 <NA> Green Pear 50.1
109 <NA> Blue
2012 Oct 03
2
Creating tiff with 1200 dpi
Hi all,
I am trying to create images in R suitable for journal publication. I'd
like to make an image that is 3.6" wide and 5.08" length, and 1200 dpi.
When I create a tiff file that is 800 dpi and 4x4", it works (although
doesn't look good).
But when I create a tiff that is the size and dpi I want, it doesn't
work. I get the following error:
Error in tiff(filename =
2019 Mar 28
2
NFSv4: Using fsid=0 but *not* exporting the root filesystem
Hi,
I would like to use the NFSv4 ability to create a "root" filesystem with
fsid=0, so that I don't have to refer to the whole path of the exported
filesystem when I mount it. However I do *not* want this root
filesystem to be mountable by any host. Is that possible and how?
E.g
Filesystem:
/exports/data1
/exports/data2
/exports/data3
/etc/exports:
/exports
2005 Feb 16
5
scaling axes when plotting multiple data sets
1) When adding additional data sets to a plot using "plot" followed by "lines",
is there a way to automate the scaling of the axes to allow for all data sets
to fit within the plot area?
2) I attempted to solve this by setting
xlim=c(min(c(data1,data2,data3)),max(c(data1,data2,data3)))
however, there are some NAs and Infs in these data sets, and min(data1) and
max(data1) both
2017 Mar 15
2
Data structure improvement for the SLP vectorizer
Maybe it would illustrative to give an IR example of the case I'm
interested in. Consider
define void @"julia_transform_bvn_derivs_hessian!"(double* %data,
double* %data2, double *%data3, double *%out) {
%element11 = getelementptr inbounds double, double* %data, i32 1
%load10 = load double, double* %data
%load11 = load double, double* %element11
%element21 =
2016 Dec 01
2
cannot access to linux share from windows
Now I have this config on the f25 desktop and restarted the smb service but
I still have the same problem.
# net conf list
[global]
workgroup = MYDOMAIN
realm = MYDOMAIN
netbios name = F25SERVER
server string = Samba Server Version %v
kerberos method = dedicated keytab
dedicated keytab file = FILE:/etc/samba/samba.keytab
log file = /var/log/samba/log.%m
2006 Nov 24
1
barplot help needed
hello,
I would like to create the following barplot:
I have 4 different data sets (same length + stddev for each data point)
data1
sd1
data2
sd2
data3
sd3
data4
sd4
now, I'd like to plot in the following way:
data1[1],data2[1],data3[1],data4[1] with it's sd-values side-by-side at
one x-axis label (named "position 1") and each bar in different colors.
2011 Nov 18
1
couting events by subject with "black out" windows
I large datset that includes subjects(ID), Dates and events that need to be counted. Not every date includes an event, and I need to only count one event per 30days, per subject. So in essence, I need to create a 30-day "black out" period during which time an event cannot be "counted" for each subject. The reason is that a rule has been set up, whereby a subject can only be
2007 Mar 09
6
Extracting text from a character string
I have a set of character strings like below:
> data3[1]
[1] "CB01_0171_03-27-2002-(Sample 26609)-(126)"
>
I am trying to extract the text 03-27-2002 and convert this into a date for the same record. I keep looking at the grep function, however I cannot quite get it to work.
grep("\d\d-\d\d-\d\d\d\d",data3[1],perl=TRUE,value=TRUE)
Any hints?
2016 Feb 05
3
[PATCH] inspect: get windows drive letters for GPT disks.
This patch updates the guestfs_inspect_get_drive_mappings API call to
also return drive letters for GPT paritions. Previously this worked
only for MBR partitions. This is achieved by matching the GPT partition
GUID with the info stored in the blob from
HKLM\SYSTEM\MountedDevices\DosDevices keys. For GPT partions this blob
contains a "DMIO:ID:" prefix followed by a 16 byte binary GUID.
2016 Feb 05
2
[PATCHv2] inspect: get windows drive letters for GPT disks.
This patch updates the guestfs_inspect_get_drive_mappings API call to
also return drive letters for GPT paritions. Previously this worked
only for MBR partitions. This is achieved by matching the GPT partition
GUID with the info stored in the blob from
HKLM\SYSTEM\MountedDevices\DosDevices keys. For GPT partions this blob
contains a "DMIO:ID:" prefix followed by a 16 byte binary GUID.
2004 Aug 23
2
[ Multiple drives ]
Hello,
I have 3 hdd (120 GB, 120 GB and 80 GB) mounted on
/data1 , /data2 and /data3.
All these drives must be shared via a public access
with Samba.
For the moment, I can only share the 'data1'
directory.
[public]
path = /data1
Is there a possibility to share several disks under
the same account ?
By example :
[public]
path = /data1, /data2, /data3
Then, under Windows, I'd like
2016 Dec 01
2
cannot access to linux share from windows
Hello,
I have upgraded a client and a freeipa server from Fedora 24 to 25 recently.
And I cannot access linux shares located on the F25 client from a windows
desktop.
I get these messages:
[2016/12/01 11:42:19.218759, 1]
../source3/librpc/crypto/gse_krb5.c:534(fill_mem_keytab_from_dedicated_keytab)
../source3/librpc/crypto/gse_krb5.c:534: smb_krb5_open_keytab failed (Key
table name
2013 Apr 03
1
linear model coefficients by year and industry, fitted values, residuals, panel data
Hi R-helpers,
My real data is a panel (unbalanced and with gaps in years) of thousands of firms, by year and industry, and with financial information (variables X, Y, Z, for example), the number of firms by year and industry is not always equal, the number of years by industry is not always equal.
#reproducible example
firm1<-sort(rep(1:10,5),decreasing=F)
year1<-rep(2000:2004,10)
2013 Mar 26
1
Increase font size in plots
Hi
I am using violin plots (type of boxplots) and I am trying to increase the font size in the plots.
It looks like that the violin plots do not work as "normal" plots as the cex parameters are ignored.
You can have a loot at the code below
require('vioplot')
data1<-rnorm(100)
data2<-rnorm(10)
data3<-rnorm(1000)
vioplot(data1,data2,data3,cex.lab=2,cex.axis=2)