r

I got an error when exporting data from R

元气小坏坏 提交于 2021-02-11 01:45:06
问题 When I wanted to export my results from R with this code, write.table(imp, "c:/immp.txt", sep="\t") I got this error: Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class ""mids"" to a data.frame Sorry for a simple question,I am new to R. Thanks for your help 回答1: It looks like you're trying to export a "mids" object, as opposed to a data frame. You'll need to convert it to a data frame before using write.table, which you should be

I got an error when exporting data from R

时间秒杀一切 提交于 2021-02-11 01:44:57
问题 When I wanted to export my results from R with this code, write.table(imp, "c:/immp.txt", sep="\t") I got this error: Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class ""mids"" to a data.frame Sorry for a simple question,I am new to R. Thanks for your help 回答1: It looks like you're trying to export a "mids" object, as opposed to a data frame. You'll need to convert it to a data frame before using write.table, which you should be

Cannot connect remotely to shiny-server and get R app working properly

自闭症网瘾萝莉.ら 提交于 2021-02-11 00:37:53
问题 I HAVE FIXED THIS ISSUE. Please read answer below I have installed shiny-server on Ubuntu 14.04.4 LTS with VirtualBox. After forwarding port 3838 in my router and setting a bridged network, then assigning a static IP to my virtual Ubuntu machine, I am being able to connect remotely, from a computer outside from my network and visualize the "hello" example app page, but only the HTML code is rendered. Both R and markdown iframes are not working (connection is reset and they are grayed). On the

Cannot connect remotely to shiny-server and get R app working properly

回眸只為那壹抹淺笑 提交于 2021-02-11 00:33:56
问题 I HAVE FIXED THIS ISSUE. Please read answer below I have installed shiny-server on Ubuntu 14.04.4 LTS with VirtualBox. After forwarding port 3838 in my router and setting a bridged network, then assigning a static IP to my virtual Ubuntu machine, I am being able to connect remotely, from a computer outside from my network and visualize the "hello" example app page, but only the HTML code is rendered. Both R and markdown iframes are not working (connection is reset and they are grayed). On the

Error when using purrr's map and possibly

我是研究僧i 提交于 2021-02-11 00:10:48
问题 I'm trying to run a looped chi-square dataframe . I'm using map and possibly , both from purrr , to allow the loop to run even if an error is thrown. Somewhere in my data.frame, I have a column that apparently has less than two values -- I can't find it. But, that's why I'm trying to run possibly . But, I'm now getting an error that says: Can't convert a list to function. I'm not sure how to reconcile this error. I've gotten a replicable example that throws the error using the mtcars data

Error when using purrr's map and possibly

二次信任 提交于 2021-02-11 00:10:36
问题 I'm trying to run a looped chi-square dataframe . I'm using map and possibly , both from purrr , to allow the loop to run even if an error is thrown. Somewhere in my data.frame, I have a column that apparently has less than two values -- I can't find it. But, that's why I'm trying to run possibly . But, I'm now getting an error that says: Can't convert a list to function. I'm not sure how to reconcile this error. I've gotten a replicable example that throws the error using the mtcars data

glmmTMB with autocorrelation of irregular times

谁说我不能喝 提交于 2021-02-11 00:01:25
问题 I'm putting together a glmmTMB model. I have data collected at a single site over the course of May, every year, for 4 years. Time resolution within year can range from a few minutes (or even same minute) to days apart. The covariance vignette says that the ar1() structure requires a regular time series, but the ou(times + 0 | group) structure can handle irregular times. That said - it looks like the times argument is a factor - how does that work with irregular time structure?? So, for

glmmTMB with autocorrelation of irregular times

柔情痞子 提交于 2021-02-11 00:00:37
问题 I'm putting together a glmmTMB model. I have data collected at a single site over the course of May, every year, for 4 years. Time resolution within year can range from a few minutes (or even same minute) to days apart. The covariance vignette says that the ar1() structure requires a regular time series, but the ou(times + 0 | group) structure can handle irregular times. That said - it looks like the times argument is a factor - how does that work with irregular time structure?? So, for

glmmTMB with autocorrelation of irregular times

假如想象 提交于 2021-02-10 23:59:13
问题 I'm putting together a glmmTMB model. I have data collected at a single site over the course of May, every year, for 4 years. Time resolution within year can range from a few minutes (or even same minute) to days apart. The covariance vignette says that the ar1() structure requires a regular time series, but the ou(times + 0 | group) structure can handle irregular times. That said - it looks like the times argument is a factor - how does that work with irregular time structure?? So, for

R: How to Draw heat map divided by a digonal line?

时光总嘲笑我的痴心妄想 提交于 2021-02-10 23:51:02
问题 I came across this article on Nature Methods which provided a very nice heatmap: http://www.nature.com/nmeth/journal/v12/n4/full/nmeth.3311.html Different from other heat map is each rectangle is divided by a diagonal line, with 1 part represent the literature data and the other in-house data. I think this is a very nice way to compare the data. However, I do not know how to draw this pic in R. Does anyone have any clue on how to do this? A small screenshot is provided below: Below is a demo