我正在Ubuntu 18.04.2计算机中使用Rstudio 3.5.2。
render() {
const lyrics = this.props.songs.map((song, index) =>
<View style={styles.musicBox} key={index}>
<View style={{width: 57, height: 59, borderRadius: 9, marginLeft: 15}}>
<Image resizeMode="contain"
style={{alignSelf: 'center', borderRadius: 9, width: 57, height: 59}}
source={{uri: song[0].cover}}/>
</View>
<View style={styles.TextBox}>
<Text
numberOfLines={1}
style={{fontFamily: 'nexaBold', fontSize: 20, color: 'white', flex: 1}}>
{song[0].title}
</Text>
<View style={{flexDirection: 'row', }}>
<Text
numberOfLines={1}
style={{fontFamily: 'nexaLight', fontSize: 10, color: '#917D7D',
marginRight: 5, }}>
{song[0].author}
</Text>
<View style={{alignSelf:'center',width: 2, height: 2, borderRadius: 1, backgroundColor: '#917D7D',marginRight: 5}}>
</View>
<Text style={{fontFamily: 'nexaLight', fontSize: 10, color: '#917D7D'}}>
{this.millisToMinutesAndSeconds(song.duration)}
</Text></View>
</View>
</View>
);
const music =
<ScrollView overScrollMode={'never'} keyboardShouldPersistTaps='always'>
{lyrics}</ScrollView>;
const shadowOpt = {
color: "#000",
border: 12,
opacity: '0.08',
radius: 12,
x: 0,
y: 1,
};
return (
<View style={{flex: 1}}>
<View style={styles.linearGradient}>
{music}
</View>
</View>
);
}
}
主要问题是,当我将变量另存为.RData文件时,Rstudio会挂起几分钟(有时是几小时)。关键是R完成正确保存文件但挂起。
例如
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
将“ a”另存为.RData文件时,R在保存后会挂起几分钟。 我可以看到R在重新工作之前已经完成了保存数据的工作。 我强迫退出R并重新计算数据并加载先前保存的矩阵并检查它们是否相等:
#Let's suppose that I calculate a matrix "a" that takes me a lote of time to achieve.
set.seed(123)
a <- matrix(rnorm (20000 * 50), nrow=20000,ncol=50)
save(a,file="a.RData")