similar to: Reading multiple text files and then combining into a dataframe

Displaying 20 results from an estimated 700 matches similar to: "Reading multiple text files and then combining into a dataframe"

2011 Sep 23
1
Newbie question: Converting Table
Hi, I'm new to R, and I have searched helpfiles and this forum on my 2 questions. Hope you guys can help me out! :-) Many thanks in advance! Cheers, Lars Q1: I imported a csv file with columnames subject and class. There are about 1000 different classes... It looks like this: subject1, class1 subject1, class2 subject2, class1 subject2, class3 ... subject999, class1 subject999, class2
2009 Dec 12
4
simple ts.plot question
*Respected Sir, I have a simple question regarding plots of time series in R. I have to plot "conc" against "time" **for each individual and display in the same panel for the in-built dataset "Indometh" in R. * ***I have six time series, say subject1.ts, subject2.ts, ............., subject6.ts. The observations are taken at an interval of 0.25 hr. All of the series
2010 Oct 30
2
transforming a dataset for association analysis
Hi I would like to transform a data frame like Subject Item Score Subject 1 Item 1 1 Subject 1 Item 2 0 Subject 1 Item 3 1 Subject 2 Item 1 1 Subject 2 Item 2 1 Subject 2 Item 3 0 .... *to * Subject Item1 Item2 Item3 .....Item N Subject1 1 0 1 Subject2 1 1 0 ........ SubjectP.. Apologize for the simple nature of my query but I am stuck.
2010 Nov 01
2
transforming a dataset for association analysis RESHAPE2
I get the following message when using the reshape2 package line > tDat.m<- melt(Dataset) Using Item, Subject as id variables > tDatCast<- acast(tDat.m,Subject~Item) Aggregation function missing: defaulting to length Note Problem Statement- convert dataframe Subject Item Score 1 Subject 1 Item 1 1 2 Subject 1 Item 2 0 3 Subject 1 Item 3 1 4 Subject 2 Item 1 1 5
2011 Dec 07
1
MIXED MODEL WITH REPEATED MEASURES
I am trying to specify a mixed model for my research, but I can't quite get it to work. I've spent several weeks looking thru various online sources to no avail. I can't find an example of someone trying to do precisely what I'm trying to do. I'm hoping some smart member of this mailing list may be able to help. First off, full disclosure: (1) I'm an engineer by trade, so
2018 Jan 05
0
Calculating the correlations of nested random effects in lme4
I postulate the following model AC <- glmer(Accuracy ~ RT*Group + (1+RT|Group:subject) + (1+RT|Group:Trial), data = da, family = binomial, verbose = T) Here I predict Accuracy from RT, Group (which has values 0 or 1) and the interaction of Group and RT (those are the fixed effects). I also estimate the random effects for both intercepts and slopes for subjects and different trials.
2011 May 21
0
Problem with ANOVA repeated measures: "Error() model is singular"
Hello everybody, I need an help because I don´t know if the command for the ANOVA analysis I am performing in R is correct. Indeed using the function aov I get the following error:"In aov (......) Error() model is singular" The structure of my table is the following: subject, stimulus, condition, sex, response Example: subject stimulus condition sex response
2012 Nov 12
3
select different variables from a list of data frames
Hi: How do I select different variables from a list of data frames. I have a list of 13 that looks like below. Each data frame has more variables than I need. How do I go through the list and select the variables that I need. In the example below, I need to get the variables "a", and "q10" and "q14" to be returned to two separate data frames. Thank you. Yours, Simon
2012 Nov 09
5
using lapply with recode
Hello: Forgive me, this is surely a simple question but I can't figure it out, having consulted the help archives and "Data Manipulation With R" (Spector). I have a list of 11 data frames with one common variable in each (prov). I'd like to use lapply to go through and recode one particular level of that common variable. I can get the recode to work, but it only returns the
2009 Dec 15
2
subtitle in Hmisc xYplot
Ok so I am trying to add a subtitle to my xYplot using Hmisc and I have some dummy code of x<-seq(1,10,1) y<-rev(seq(1,10,1)) ci<-y*.10 ciupper<-y+ci cilower<-y-ci this code works fine: xYplot(Cbind(y,ciupper,cilower)~x, type=c("b"),plot.points = TRUE, method='filled bands', main='main title') but when I add sub=. at the end and use this
2009 Nov 27
2
layers in xYplot of Hmisc
In the "filled bands" part of xYplot of the Hmisc package, is there a way to have multiple bands with multiple lines? or does it just allow one for now? So I had an example bit ago had a made up line and CI, now if I wanted to make a second line with a CI filled in can I put them on the same plot? x<-seq(1,10,1) y<-seq(1,10,1) ci<-y*.10 ciupper<-y+ci
2012 Aug 17
7
Remove several numbers from a sequence
Can anyone tell me how to remove several numbers for a sequence. For example: xx<- c(1,5,7,10) yy<-seq(1,10,1) how do I get take xx away from yy to get the new sequence 2,3,4,6,8,9 Many thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/Remove-several-numbers-from-a-sequence-tp4640630.html Sent from the R help mailing list archive at Nabble.com.
2009 Nov 20
1
Hmisc and Lattice question on gridlines
I have been using lattice xyplot and am quite pleased, and I can use the type=c("b","g") to have it print gridlines into the page, yet if I want to have a line plot with points on it, how do I get the xYplot to print gridlines (I use Hmisc xYplot because of its bands method which allows plotting of confidence intervals). Any suggestions? I have looked at the panel functions but
2010 Feb 18
2
3D plot
Dearl list, can anyone point me to a function or library that can create a graph similar to the one in the following powerpoint presentation? http://bmi.osu.edu/~khuang/IBGP705/BMI705-Lecture7.ppt (pages 36-37) In order to try to explain the graph, the way I see it in R terms is something like this: the "p-q" axis is a vector of positions (for example, seq(0,5000000,1)) the
2013 Mar 06
1
Troubles with labeling x axis
Hi! I have problems with labeling x axis while plotting time series data. I have 40 monthly measurement. One period lasts 4 months. I'd like to have 40 ticks on x axis (10 larger, the rest smaller) and labels just at the beginning of each period, just like in the image <http://r.789695.n4.nabble.com/file/n4660465/2221.jpg> My code leaves x axis empty: > data <-
2012 Dec 05
1
nlme starting values are not the correct length
Dear R community, I am trying to fit an nlme model where I want to estimate the fixed effects of two treatments on the parameters on the following equation Photo~(a*(1-exp(-c*PARi/a)))-b I was able to fit a simple model without covariates following the method described in Mixed-Effects Methods and Classes for S and S-PLUS, version 3.0, but when I add the covariates, I get the error "
2008 Jan 30
1
assign column classes when creating a data frame from several vectors
R-helpers, Thanks in advance for your help. I am an R newbie and I am having trouble figuring out the easiest/most efficient way to assign classes to columns in a newly created data frame. R seems to want to convert everything to a factor when I use the cbind function to compile vectors into a data frame. ID<-seq(1,10,1) TREAT<-c(rep("B",5),rep("G",5))
2020 Sep 08
0
[PATCH 2/3] drm/virtio: return virtio_gpu_queue errors
In case queuing virtio commands fails (can happen when the device got unplugged) pass up the error. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_vq.c | 36 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index
2019 Apr 23
0
[PATCH nbdkit 1/2] ocaml: Initialize pread buffer with zeroes to avoid leaking heap memory.
In the C part of the OCaml plugin we create a ‘bytes’ [byte array] and pass it to the OCaml pread method. The plugin should overwrite the array with the returned data. However if (eg. because of a bug) the plugin does not fill the array then whatever was in the OCaml or possibly even the C heap before the allocation is returned to the client, possibly resulting in a leak of sensitive data. We
2003 Jan 29
3
Analyzing an unbalanced AB/BA cross-over design
I am looking for help to analyze an unbalanced AB/BA cross-over design by requesting the type III SS ! # Example 3.1 from S. Senn (1993). Cross-over Trials in Clinical Research outcome<-c(310,310,370,410,250,380,330,270,260,300,390,210,350,365,370,310,380,290,260,90,385,400,410,320,340,220) subject<-as.factor(c(1,4,6,7,10,11,14,1,4,6,7,10,11,14,2,3,5,9,12,13,2,3,5,9,12,13))